用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/chalk-lab/Mooncake.jl --skill inspect命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | inspect |
| description | Inspect the AD pipeline IR for a Julia function at each Mooncake compilation stage. |
Inspect IR transformations in Mooncake's AD pipeline for a given function.
using Mooncake, Mooncake.SkillUtils
Ask the user:
sin, 1.0 or a custom functionDo not assume — ask the user to pick.
| Stage | Symbol | Description |
|---|---|---|
| Raw IR | :raw | optimised, type-inferred SSAIR from Julia's compiler |
| Normalised | :normalized | after Mooncake's normalisation passes |
| CFG blocks | :cfg_blocks | Vector{CFGBlock} representation with stable IDs |
| Forward IR | :fwd_ir | generated forward-pass IR |
| Reverse IR | :rvs_ir | generated pullback IR |
| Optimised Forward | :optimized_fwd | forward pass after optimisation |
| Optimised Reverse | :optimized_rvs | pullback after optimisation |
| Stage | Symbol | Description |
|---|---|---|
| Raw IR | :raw | optimised, type-inferred SSAIR from Julia's compiler |
| Normalised | :normalized | after Mooncake's normalisation passes |
| CFG blocks | :cfg_blocks | inspection-only — forward mode does not use the CFGBlock representation internally |
| Dual IR | :dual_ir | generated dual-number IR |
| Optimised | :optimized | after optimisation passes |
# Full inspection
ins = inspect_ir(f, args...; mode=:reverse) # or mode=:forward
# View stages
show_ir(ins) # all stages
show_stage(ins, :raw) # one stage
# Diffs between stages
show_diff(ins; from=:raw, to=:normalized)
show_all_diffs(ins)
# World age debugging
show_world_info(ins)
# Write everything to files
write_ir(ins, "/tmp/ir_output")
# Shorthand helpers
ins = inspect_fwd(f, args...) # forward mode
ins = inspect_rvs(f, args...) # reverse mode
ins = quick_inspect(f, args...) # inspect + display immediately
# Options
inspect_ir(f, args...;
mode = :reverse,
optimize = true,
do_inline = true,
debug_mode = false,
)
Inspects Mooncake's internal AD pipeline only. For allocation, world-age, or compiler-boundary debugging, see docs/src/developer_documentation/advanced_debugging.md.