[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-compileiq-author-objective":3,"mdc--ad0qis-key":31,"related-repo-nvidia-compileiq-author-objective":1397,"related-org-nvidia-compileiq-author-objective":1481},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":29,"mdContent":30},"compileiq-author-objective","author CompileIQ objective functions","Use when writing the objective_function= passed to Search(). Covers the two legal signatures (compiler-only str vs mixed list), the baseline-knockout branch, per-eval cache busting, framework-specific --apply-controls injection (raw PTXAS, NVCC, Triton, Helion, cuTeDSL\u002FFA4, FlashInfer), correctness-before-timing, INVALID_SCORE handling, and the Debug-pack O0\u002FO3 ACF-injection canary that must pass before launching a search. Triggers on \"objective function\", \"apply-controls\", \"INVALID_SCORE\", \"save_compiler_config\", \"baseline knockout\", \"BASELINE_CONFIG\", \"every config returns the same score\", \"TypeError fromhex\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,17],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Engineering","engineering",107,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FCompileIQ","2026-07-14T05:32:10.176779","Apache-2.0",8,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":28},[],"An Optimizer for Nvidia Compilers.","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FCompileIQ\u002Ftree\u002FHEAD\u002Fagent-skills\u002Fcompileiq-author-objective","---\nname: compileiq-author-objective\ndescription: >\n  Use when writing the objective_function= passed to Search(). Covers the two\n  legal signatures (compiler-only str vs mixed list), the baseline-knockout\n  branch, per-eval cache busting, framework-specific --apply-controls\n  injection (raw PTXAS, NVCC, Triton, Helion, cuTeDSL\u002FFA4, FlashInfer),\n  correctness-before-timing, INVALID_SCORE handling, and the Debug-pack\n  O0\u002FO3 ACF-injection canary that must pass before launching a search.\n  Triggers on \"objective function\", \"apply-controls\", \"INVALID_SCORE\",\n  \"save_compiler_config\", \"baseline knockout\", \"BASELINE_CONFIG\", \"every config\n  returns the same score\", \"TypeError fromhex\".\nwhen_to_use: |\n  - About to write or modify the function passed as objective_function=.\n  - Search runs but every config returns an identical score (canary fails).\n  - Getting TypeError around fromhex or bytes (legacy pattern).\n  - Search hangs on individual configs (timeout\u002Fcorrectness handling missing).\nlicense: Apache-2.0\nmetadata:\n  version: \"1.0.0\"\n  author: NVIDIA CompileIQ\n  domain: compiler-optimization\nallowed-tools: Bash Read\npaths: [\"**\u002F*.py\", \"**\u002F*.cu\", \"**\u002F*.cuh\"]\n---\n\n# compileiq-author-objective\n\nThe objective function is where ~80% of CompileIQ user errors happen. This\nskill tells you the exact shape it must have for current CompileIQ, how to\ninject `--apply-controls` for each supported compile path, and how to verify\nthe whole pipeline works before paying for a full search.\n\nFor paste-ready full-file templates per framework, see\n`references\u002Ftemplates.md`.\n\n## When\n\n- Writing a brand-new objective function.\n- Migrating an older objective off the legacy `bytes.fromhex(config_blob)` pattern.\n- Diagnosing \"every config returns the same score\" or \"TypeError: fromhex\".\n\n## The two legal signatures\n\n| Shape of `search_space=` | Objective signature | What `config` is |\n|---|---|---|\n| Single provider, e.g. `PtxasSearchSpace()` | `def objective(config: str) -> float` | A hex string. Pass it straight to `save_compiler_config(acf_path, config)`. |\n| List, e.g. `[{\"k\": ss.choice(...)}, PtxasSearchSpace()]` | `def objective(mixed: list) -> float` | A list of the same length. Unpack: `user_space, ptxas_config = mixed`. |\n\nMixed-space results keep the same list shape in `best[\"params\"]`. Unpack it\nbefore saving the ACF, for example:\n`user_space, ptxas_config = best[\"params\"]`. (Pattern reference:\n`examples\u002Fcompilers\u002Ftriton_example\u002Fmixed_triton.py:123-146`.)\n\nFor multi-objective, return `tuple[float, ...]` of length `num_objectives`.\n\n## Canonical imports\n\n```python\nfrom compileiq.types import INVALID_SCORE, BASELINE_CONFIG\nfrom compileiq.utils.helpers import save_compiler_config\n```\n\n`INVALID_SCORE` is CompileIQ's sentinel — return it on any failure (compile,\nhang, wrong answer, exception). Do **not** redefine it as `float('inf')`.\n\n`BASELINE_CONFIG` is the empty-dict sentinel CompileIQ passes when a knockout\nknocks out every parameter (typically with `normalize=True`).\n\n`save_compiler_config(path, hex_str)` writes the binary blob to disk; it\nhandles the `bytes.fromhex` internally (`compileiq\u002Futils\u002Fhelpers.py:128-137`).\nUsers never need to touch `fromhex` themselves.\n\n## Self-contained for IsoMultiProcessWorker and Ray\n\nHeavy library imports (torch, triton, helion, cute) go **inside** the function\nso the process `IsoMultiProcessWorker` spawns — or the remote Ray task — can\nre-import them in a clean state. Cheap module-level constants (paths, regexes)\nare fine.\n\n## Per-eval cache busting (non-negotiable)\n\n```python\nimport os, tempfile\nenv = os.environ.copy()\nenv[\"TRITON_ALWAYS_COMPILE\"] = \"1\"\nenv[\"HELION_SKIP_CACHE\"]     = \"1\"\nenv[\"TRITON_CACHE_DIR\"]      = tempfile.mkdtemp(prefix=\"ciq_triton_\")\n```\n\nFor FlashInfer, additionally confirm the prebuilt cubin cache packages are\nabsent — `flashinfer_cubin` and `flashinfer_jit_cache`. See\n`docs\u002Fflashinfer_booster.md:56-64` for the import-time check.\n\n## Per-framework `--apply-controls` injection\n\n| Target | Injection |\n|---|---|\n| Raw PTXAS (you have a `.ptx` file) | `ptxas --apply-controls candidate.acf kernel.ptx -arch=sm_100 -o kernel.cubin` |\n| NVCC source (CUDA `.cu`) | `nvcc -Xptxas --apply-controls=candidate.acf -arch=sm_100 kernel.cu -o exe` (canonical; see `examples\u002Fcompilers\u002Fnvbench_example\u002Foptimize_reduction.py:108`) |\n| Triton kernel | kernel kwarg: `kernel[grid](..., ptx_options=f\"--apply-controls={acf_path}\")` plus `TRITON_ALWAYS_COMPILE=1`, `os.environ[\"TRITON_PTXAS_PATH\"] = shutil.which(\"ptxas\")`, and `os.environ[\"TRITON_PTXAS_BLACKWELL_PATH\"] = shutil.which(\"ptxas\")` when Blackwell-specific PTXAS selection may apply. This **replaces** the older `PTXAS_OPTIONS=` env-var approach for Triton. |\n| Helion | Helion's official ACF API. See `https:\u002F\u002Fhelionlang.com\u002Fexamples\u002Facfs\u002Fsoftmax_acf.html`. Always set `HELION_SKIP_CACHE=1`. |\n| cuTeDSL \u002F FA4 (TVM-FFI) | `cute.compile(..., options=f\"{existing_options} --ptxas-options '--apply-controls {acf_path}'\")`. If you can't reach the call site, patch `CompileCallable.__call__` to splice in the option string. |\n| FlashInfer | `FLASHINFER_EXTRA_CUDAFLAGS=\"--ptxas-options=--apply-controls=$ACF_FILE\"` (see `docs\u002Fflashinfer_booster.md:107`). |\n\n## Baseline knockout branch\n\n```python\ndef objective(config):\n    if isinstance(config, dict) and not config:   # config == BASELINE_CONFIG\n        return measure_without_acf()              # establish baseline run\n    # config is a hex string (or list with hex tail) — apply ACF\n    ...\n```\n\n## Correctness-before-timing (mandatory)\n\nThe optimizer rewards whatever you measure. If you only measure\nlatency, the algorithm will happily reward configs that compile faster by\nproducing wrong answers. **Always** verify against a reference first:\n\n```python\nif not torch.allclose(actual, reference, atol=1e-2, rtol=0):\n    return INVALID_SCORE\nreturn triton.testing.do_bench(lambda: kernel(...), warmup=100, rep=1000, return_mode=\"mean\")\n```\n\n(Pattern from `examples\u002Fcompilers\u002Ftriton_example\u002Fmixed_triton.py:141-146`.)\n\n## Catch everything → return INVALID_SCORE\n\n```python\ntry:\n    ...\nexcept (subprocess.TimeoutExpired, RuntimeError, FileNotFoundError, ValueError, OSError) as e:\n    return INVALID_SCORE\n```\n\nWhen in doubt, catch broadly. CompileIQ expects\n`INVALID_SCORE` as the \"this config is broken\" signal — re-raising means the\nentire search fails.\n\n## Pre-search canary (mandatory before tuner.start())\n\nTwo cheap calls that catch ~90% of \"every score is the same\" bugs:\n\n```python\n# Shape check — does the objective even run?\nsample = tuner.sample(1)[0]\nscore = objective(sample)\nprint(f\"sample run: {score}\")\nassert isinstance(score, (int, float)) and score == score   # not NaN\n\n# ACF-injection canary using the Debug pack (downloaded once)\nfrom compileiq.utils.helpers import load_compiler_config\nO0_HEX = load_compiler_config(\"debug-pack\u002FO0.acf\")\nO3_HEX = load_compiler_config(\"debug-pack\u002FO3.acf\")\n\nbaseline = objective({})                  # BASELINE_CONFIG path\nscore_O0 = objective(O0_HEX)\nscore_O3 = objective(O3_HEX)\n\nassert score_O0 > baseline * 1.05, (\n    f\"O0 should regress (got {score_O0} vs baseline {baseline}). \"\n    \"ACF is NOT reaching PTXAS — fix the cache-bust.\"\n)\nassert abs(score_O3 - baseline) \u002F baseline \u003C 0.05, (\n    f\"O3 should match baseline (got {score_O3} vs {baseline}).\"\n)\nprint(\"ACF injection canary PASSED — safe to start the search.\")\n```\n\nIf either assertion fails, **stop** and fix the cache-bust before launching\nthe search. Otherwise every generation's score is measurement noise on a stale\nbinary.\n\n## Self-test\n\nA 3-line \"smoke\" objective inside the SKILL author's repo, used to verify the\nscaffolding before plugging in a real kernel:\n\n```python\ndef smoke_objective(config):\n    return 1.0   # constant; useful to verify Search() shape, not measurement\n```\n\nDrop it into the `Search(...)` call and run 2 generations; if that completes\nand `results.get_best_result()` returns a dict, your scaffold is correct.\n\n## Gotchas\n\n- **`PTXAS_OPTIONS` is not the canonical Triton injection.** It still works\n  for raw subprocess invocations, but Triton 3.x prefers the\n  `ptx_options=` kernel kwarg. See the table above.\n- **Mixed search spaces require list unpacking.** If you pass\n  `search_space=[user_dict, PtxasSearchSpace()]`, your objective must accept\n  a list, not a string. Results keep that list in `best[\"params\"]`; unpack it\n  before saving the compiler config.\n- **Don't redefine `INVALID_SCORE`.** Import it from `compileiq.types`. If\n  you redefine it locally as `float('inf')`, the value happens to work today\n  but is not guaranteed to in future releases.\n- **`config_blob` is no longer a parameter name.** The old skill set used\n  `def objective(config_blob)` and called `bytes.fromhex(config_blob)`. Both\n  are stale. Use `def objective(config)` and `save_compiler_config(path, config)`.\n\n## Next\n\n- Sizing `SearchConfiguration` and picking a Worker: `compileiq-run-search`.\n- After the search: `compileiq-validate-result`.\n- If something's wrong: `compileiq-debug`.\n",{"data":32,"body":43},{"name":4,"description":6,"when_to_use":33,"license":23,"metadata":34,"allowed-tools":38,"paths":39},"- About to write or modify the function passed as objective_function=.\n- Search runs but every config returns an identical score (canary fails).\n- Getting TypeError around fromhex or bytes (legacy pattern).\n- Search hangs on individual configs (timeout\u002Fcorrectness handling missing).\n",{"version":35,"author":36,"domain":37},"1.0.0","NVIDIA CompileIQ","compiler-optimization","Bash Read",[40,41,42],"**\u002F*.py","**\u002F*.cu","**\u002F*.cuh",{"type":44,"children":45},"root",[46,53,68,81,88,116,122,239,268,288,294,325,351,370,405,411,431,437,487,516,529,751,757,804,810,822,853,865,871,908,920,926,931,1137,1149,1155,1160,1183,1204,1210,1338,1344,1391],{"type":47,"tag":48,"props":49,"children":50},"element","h1",{"id":4},[51],{"type":52,"value":4},"text",{"type":47,"tag":54,"props":55,"children":56},"p",{},[57,59,66],{"type":52,"value":58},"The objective function is where ~80% of CompileIQ user errors happen. This\nskill tells you the exact shape it must have for current CompileIQ, how to\ninject ",{"type":47,"tag":60,"props":61,"children":63},"code",{"className":62},[],[64],{"type":52,"value":65},"--apply-controls",{"type":52,"value":67}," for each supported compile path, and how to verify\nthe whole pipeline works before paying for a full search.",{"type":47,"tag":54,"props":69,"children":70},{},[71,73,79],{"type":52,"value":72},"For paste-ready full-file templates per framework, see\n",{"type":47,"tag":60,"props":74,"children":76},{"className":75},[],[77],{"type":52,"value":78},"references\u002Ftemplates.md",{"type":52,"value":80},".",{"type":47,"tag":82,"props":83,"children":85},"h2",{"id":84},"when",[86],{"type":52,"value":87},"When",{"type":47,"tag":89,"props":90,"children":91},"ul",{},[92,98,111],{"type":47,"tag":93,"props":94,"children":95},"li",{},[96],{"type":52,"value":97},"Writing a brand-new objective function.",{"type":47,"tag":93,"props":99,"children":100},{},[101,103,109],{"type":52,"value":102},"Migrating an older objective off the legacy ",{"type":47,"tag":60,"props":104,"children":106},{"className":105},[],[107],{"type":52,"value":108},"bytes.fromhex(config_blob)",{"type":52,"value":110}," pattern.",{"type":47,"tag":93,"props":112,"children":113},{},[114],{"type":52,"value":115},"Diagnosing \"every config returns the same score\" or \"TypeError: fromhex\".",{"type":47,"tag":82,"props":117,"children":119},{"id":118},"the-two-legal-signatures",[120],{"type":52,"value":121},"The two legal signatures",{"type":47,"tag":123,"props":124,"children":125},"table",{},[126,164],{"type":47,"tag":127,"props":128,"children":129},"thead",{},[130],{"type":47,"tag":131,"props":132,"children":133},"tr",{},[134,146,151],{"type":47,"tag":135,"props":136,"children":137},"th",{},[138,140],{"type":52,"value":139},"Shape of ",{"type":47,"tag":60,"props":141,"children":143},{"className":142},[],[144],{"type":52,"value":145},"search_space=",{"type":47,"tag":135,"props":147,"children":148},{},[149],{"type":52,"value":150},"Objective signature",{"type":47,"tag":135,"props":152,"children":153},{},[154,156,162],{"type":52,"value":155},"What ",{"type":47,"tag":60,"props":157,"children":159},{"className":158},[],[160],{"type":52,"value":161},"config",{"type":52,"value":163}," is",{"type":47,"tag":165,"props":166,"children":167},"tbody",{},[168,204],{"type":47,"tag":131,"props":169,"children":170},{},[171,183,192],{"type":47,"tag":172,"props":173,"children":174},"td",{},[175,177],{"type":52,"value":176},"Single provider, e.g. ",{"type":47,"tag":60,"props":178,"children":180},{"className":179},[],[181],{"type":52,"value":182},"PtxasSearchSpace()",{"type":47,"tag":172,"props":184,"children":185},{},[186],{"type":47,"tag":60,"props":187,"children":189},{"className":188},[],[190],{"type":52,"value":191},"def objective(config: str) -> float",{"type":47,"tag":172,"props":193,"children":194},{},[195,197,203],{"type":52,"value":196},"A hex string. Pass it straight to ",{"type":47,"tag":60,"props":198,"children":200},{"className":199},[],[201],{"type":52,"value":202},"save_compiler_config(acf_path, config)",{"type":52,"value":80},{"type":47,"tag":131,"props":205,"children":206},{},[207,218,227],{"type":47,"tag":172,"props":208,"children":209},{},[210,212],{"type":52,"value":211},"List, e.g. ",{"type":47,"tag":60,"props":213,"children":215},{"className":214},[],[216],{"type":52,"value":217},"[{\"k\": ss.choice(...)}, PtxasSearchSpace()]",{"type":47,"tag":172,"props":219,"children":220},{},[221],{"type":47,"tag":60,"props":222,"children":224},{"className":223},[],[225],{"type":52,"value":226},"def objective(mixed: list) -> float",{"type":47,"tag":172,"props":228,"children":229},{},[230,232,238],{"type":52,"value":231},"A list of the same length. Unpack: ",{"type":47,"tag":60,"props":233,"children":235},{"className":234},[],[236],{"type":52,"value":237},"user_space, ptxas_config = mixed",{"type":52,"value":80},{"type":47,"tag":54,"props":240,"children":241},{},[242,244,250,252,258,260,266],{"type":52,"value":243},"Mixed-space results keep the same list shape in ",{"type":47,"tag":60,"props":245,"children":247},{"className":246},[],[248],{"type":52,"value":249},"best[\"params\"]",{"type":52,"value":251},". Unpack it\nbefore saving the ACF, for example:\n",{"type":47,"tag":60,"props":253,"children":255},{"className":254},[],[256],{"type":52,"value":257},"user_space, ptxas_config = best[\"params\"]",{"type":52,"value":259},". (Pattern reference:\n",{"type":47,"tag":60,"props":261,"children":263},{"className":262},[],[264],{"type":52,"value":265},"examples\u002Fcompilers\u002Ftriton_example\u002Fmixed_triton.py:123-146",{"type":52,"value":267},".)",{"type":47,"tag":54,"props":269,"children":270},{},[271,273,279,281,287],{"type":52,"value":272},"For multi-objective, return ",{"type":47,"tag":60,"props":274,"children":276},{"className":275},[],[277],{"type":52,"value":278},"tuple[float, ...]",{"type":52,"value":280}," of length ",{"type":47,"tag":60,"props":282,"children":284},{"className":283},[],[285],{"type":52,"value":286},"num_objectives",{"type":52,"value":80},{"type":47,"tag":82,"props":289,"children":291},{"id":290},"canonical-imports",[292],{"type":52,"value":293},"Canonical imports",{"type":47,"tag":295,"props":296,"children":301},"pre",{"className":297,"code":298,"language":299,"meta":300,"style":300},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from compileiq.types import INVALID_SCORE, BASELINE_CONFIG\nfrom compileiq.utils.helpers import save_compiler_config\n","python","",[302],{"type":47,"tag":60,"props":303,"children":304},{"__ignoreMap":300},[305,316],{"type":47,"tag":306,"props":307,"children":310},"span",{"class":308,"line":309},"line",1,[311],{"type":47,"tag":306,"props":312,"children":313},{},[314],{"type":52,"value":315},"from compileiq.types import INVALID_SCORE, BASELINE_CONFIG\n",{"type":47,"tag":306,"props":317,"children":319},{"class":308,"line":318},2,[320],{"type":47,"tag":306,"props":321,"children":322},{},[323],{"type":52,"value":324},"from compileiq.utils.helpers import save_compiler_config\n",{"type":47,"tag":54,"props":326,"children":327},{},[328,334,336,342,344,350],{"type":47,"tag":60,"props":329,"children":331},{"className":330},[],[332],{"type":52,"value":333},"INVALID_SCORE",{"type":52,"value":335}," is CompileIQ's sentinel — return it on any failure (compile,\nhang, wrong answer, exception). Do ",{"type":47,"tag":337,"props":338,"children":339},"strong",{},[340],{"type":52,"value":341},"not",{"type":52,"value":343}," redefine it as ",{"type":47,"tag":60,"props":345,"children":347},{"className":346},[],[348],{"type":52,"value":349},"float('inf')",{"type":52,"value":80},{"type":47,"tag":54,"props":352,"children":353},{},[354,360,362,368],{"type":47,"tag":60,"props":355,"children":357},{"className":356},[],[358],{"type":52,"value":359},"BASELINE_CONFIG",{"type":52,"value":361}," is the empty-dict sentinel CompileIQ passes when a knockout\nknocks out every parameter (typically with ",{"type":47,"tag":60,"props":363,"children":365},{"className":364},[],[366],{"type":52,"value":367},"normalize=True",{"type":52,"value":369},").",{"type":47,"tag":54,"props":371,"children":372},{},[373,379,381,387,389,395,397,403],{"type":47,"tag":60,"props":374,"children":376},{"className":375},[],[377],{"type":52,"value":378},"save_compiler_config(path, hex_str)",{"type":52,"value":380}," writes the binary blob to disk; it\nhandles the ",{"type":47,"tag":60,"props":382,"children":384},{"className":383},[],[385],{"type":52,"value":386},"bytes.fromhex",{"type":52,"value":388}," internally (",{"type":47,"tag":60,"props":390,"children":392},{"className":391},[],[393],{"type":52,"value":394},"compileiq\u002Futils\u002Fhelpers.py:128-137",{"type":52,"value":396},").\nUsers never need to touch ",{"type":47,"tag":60,"props":398,"children":400},{"className":399},[],[401],{"type":52,"value":402},"fromhex",{"type":52,"value":404}," themselves.",{"type":47,"tag":82,"props":406,"children":408},{"id":407},"self-contained-for-isomultiprocessworker-and-ray",[409],{"type":52,"value":410},"Self-contained for IsoMultiProcessWorker and Ray",{"type":47,"tag":54,"props":412,"children":413},{},[414,416,421,423,429],{"type":52,"value":415},"Heavy library imports (torch, triton, helion, cute) go ",{"type":47,"tag":337,"props":417,"children":418},{},[419],{"type":52,"value":420},"inside",{"type":52,"value":422}," the function\nso the process ",{"type":47,"tag":60,"props":424,"children":426},{"className":425},[],[427],{"type":52,"value":428},"IsoMultiProcessWorker",{"type":52,"value":430}," spawns — or the remote Ray task — can\nre-import them in a clean state. Cheap module-level constants (paths, regexes)\nare fine.",{"type":47,"tag":82,"props":432,"children":434},{"id":433},"per-eval-cache-busting-non-negotiable",[435],{"type":52,"value":436},"Per-eval cache busting (non-negotiable)",{"type":47,"tag":295,"props":438,"children":440},{"className":297,"code":439,"language":299,"meta":300,"style":300},"import os, tempfile\nenv = os.environ.copy()\nenv[\"TRITON_ALWAYS_COMPILE\"] = \"1\"\nenv[\"HELION_SKIP_CACHE\"]     = \"1\"\nenv[\"TRITON_CACHE_DIR\"]      = tempfile.mkdtemp(prefix=\"ciq_triton_\")\n",[441],{"type":47,"tag":60,"props":442,"children":443},{"__ignoreMap":300},[444,452,460,469,478],{"type":47,"tag":306,"props":445,"children":446},{"class":308,"line":309},[447],{"type":47,"tag":306,"props":448,"children":449},{},[450],{"type":52,"value":451},"import os, tempfile\n",{"type":47,"tag":306,"props":453,"children":454},{"class":308,"line":318},[455],{"type":47,"tag":306,"props":456,"children":457},{},[458],{"type":52,"value":459},"env = os.environ.copy()\n",{"type":47,"tag":306,"props":461,"children":463},{"class":308,"line":462},3,[464],{"type":47,"tag":306,"props":465,"children":466},{},[467],{"type":52,"value":468},"env[\"TRITON_ALWAYS_COMPILE\"] = \"1\"\n",{"type":47,"tag":306,"props":470,"children":472},{"class":308,"line":471},4,[473],{"type":47,"tag":306,"props":474,"children":475},{},[476],{"type":52,"value":477},"env[\"HELION_SKIP_CACHE\"]     = \"1\"\n",{"type":47,"tag":306,"props":479,"children":481},{"class":308,"line":480},5,[482],{"type":47,"tag":306,"props":483,"children":484},{},[485],{"type":52,"value":486},"env[\"TRITON_CACHE_DIR\"]      = tempfile.mkdtemp(prefix=\"ciq_triton_\")\n",{"type":47,"tag":54,"props":488,"children":489},{},[490,492,498,500,506,508,514],{"type":52,"value":491},"For FlashInfer, additionally confirm the prebuilt cubin cache packages are\nabsent — ",{"type":47,"tag":60,"props":493,"children":495},{"className":494},[],[496],{"type":52,"value":497},"flashinfer_cubin",{"type":52,"value":499}," and ",{"type":47,"tag":60,"props":501,"children":503},{"className":502},[],[504],{"type":52,"value":505},"flashinfer_jit_cache",{"type":52,"value":507},". See\n",{"type":47,"tag":60,"props":509,"children":511},{"className":510},[],[512],{"type":52,"value":513},"docs\u002Fflashinfer_booster.md:56-64",{"type":52,"value":515}," for the import-time check.",{"type":47,"tag":82,"props":517,"children":519},{"id":518},"per-framework-apply-controls-injection",[520,522,527],{"type":52,"value":521},"Per-framework ",{"type":47,"tag":60,"props":523,"children":525},{"className":524},[],[526],{"type":52,"value":65},{"type":52,"value":528}," injection",{"type":47,"tag":123,"props":530,"children":531},{},[532,548],{"type":47,"tag":127,"props":533,"children":534},{},[535],{"type":47,"tag":131,"props":536,"children":537},{},[538,543],{"type":47,"tag":135,"props":539,"children":540},{},[541],{"type":52,"value":542},"Target",{"type":47,"tag":135,"props":544,"children":545},{},[546],{"type":52,"value":547},"Injection",{"type":47,"tag":165,"props":549,"children":550},{},[551,576,610,670,698,725],{"type":47,"tag":131,"props":552,"children":553},{},[554,567],{"type":47,"tag":172,"props":555,"children":556},{},[557,559,565],{"type":52,"value":558},"Raw PTXAS (you have a ",{"type":47,"tag":60,"props":560,"children":562},{"className":561},[],[563],{"type":52,"value":564},".ptx",{"type":52,"value":566}," file)",{"type":47,"tag":172,"props":568,"children":569},{},[570],{"type":47,"tag":60,"props":571,"children":573},{"className":572},[],[574],{"type":52,"value":575},"ptxas --apply-controls candidate.acf kernel.ptx -arch=sm_100 -o kernel.cubin",{"type":47,"tag":131,"props":577,"children":578},{},[579,592],{"type":47,"tag":172,"props":580,"children":581},{},[582,584,590],{"type":52,"value":583},"NVCC source (CUDA ",{"type":47,"tag":60,"props":585,"children":587},{"className":586},[],[588],{"type":52,"value":589},".cu",{"type":52,"value":591},")",{"type":47,"tag":172,"props":593,"children":594},{},[595,601,603,609],{"type":47,"tag":60,"props":596,"children":598},{"className":597},[],[599],{"type":52,"value":600},"nvcc -Xptxas --apply-controls=candidate.acf -arch=sm_100 kernel.cu -o exe",{"type":52,"value":602}," (canonical; see ",{"type":47,"tag":60,"props":604,"children":606},{"className":605},[],[607],{"type":52,"value":608},"examples\u002Fcompilers\u002Fnvbench_example\u002Foptimize_reduction.py:108",{"type":52,"value":591},{"type":47,"tag":131,"props":611,"children":612},{},[613,618],{"type":47,"tag":172,"props":614,"children":615},{},[616],{"type":52,"value":617},"Triton kernel",{"type":47,"tag":172,"props":619,"children":620},{},[621,623,629,631,637,639,645,647,653,655,660,662,668],{"type":52,"value":622},"kernel kwarg: ",{"type":47,"tag":60,"props":624,"children":626},{"className":625},[],[627],{"type":52,"value":628},"kernel[grid](..., ptx_options=f\"--apply-controls={acf_path}\")",{"type":52,"value":630}," plus ",{"type":47,"tag":60,"props":632,"children":634},{"className":633},[],[635],{"type":52,"value":636},"TRITON_ALWAYS_COMPILE=1",{"type":52,"value":638},", ",{"type":47,"tag":60,"props":640,"children":642},{"className":641},[],[643],{"type":52,"value":644},"os.environ[\"TRITON_PTXAS_PATH\"] = shutil.which(\"ptxas\")",{"type":52,"value":646},", and ",{"type":47,"tag":60,"props":648,"children":650},{"className":649},[],[651],{"type":52,"value":652},"os.environ[\"TRITON_PTXAS_BLACKWELL_PATH\"] = shutil.which(\"ptxas\")",{"type":52,"value":654}," when Blackwell-specific PTXAS selection may apply. This ",{"type":47,"tag":337,"props":656,"children":657},{},[658],{"type":52,"value":659},"replaces",{"type":52,"value":661}," the older ",{"type":47,"tag":60,"props":663,"children":665},{"className":664},[],[666],{"type":52,"value":667},"PTXAS_OPTIONS=",{"type":52,"value":669}," env-var approach for Triton.",{"type":47,"tag":131,"props":671,"children":672},{},[673,678],{"type":47,"tag":172,"props":674,"children":675},{},[676],{"type":52,"value":677},"Helion",{"type":47,"tag":172,"props":679,"children":680},{},[681,683,689,691,697],{"type":52,"value":682},"Helion's official ACF API. See ",{"type":47,"tag":60,"props":684,"children":686},{"className":685},[],[687],{"type":52,"value":688},"https:\u002F\u002Fhelionlang.com\u002Fexamples\u002Facfs\u002Fsoftmax_acf.html",{"type":52,"value":690},". Always set ",{"type":47,"tag":60,"props":692,"children":694},{"className":693},[],[695],{"type":52,"value":696},"HELION_SKIP_CACHE=1",{"type":52,"value":80},{"type":47,"tag":131,"props":699,"children":700},{},[701,706],{"type":47,"tag":172,"props":702,"children":703},{},[704],{"type":52,"value":705},"cuTeDSL \u002F FA4 (TVM-FFI)",{"type":47,"tag":172,"props":707,"children":708},{},[709,715,717,723],{"type":47,"tag":60,"props":710,"children":712},{"className":711},[],[713],{"type":52,"value":714},"cute.compile(..., options=f\"{existing_options} --ptxas-options '--apply-controls {acf_path}'\")",{"type":52,"value":716},". If you can't reach the call site, patch ",{"type":47,"tag":60,"props":718,"children":720},{"className":719},[],[721],{"type":52,"value":722},"CompileCallable.__call__",{"type":52,"value":724}," to splice in the option string.",{"type":47,"tag":131,"props":726,"children":727},{},[728,733],{"type":47,"tag":172,"props":729,"children":730},{},[731],{"type":52,"value":732},"FlashInfer",{"type":47,"tag":172,"props":734,"children":735},{},[736,742,744,750],{"type":47,"tag":60,"props":737,"children":739},{"className":738},[],[740],{"type":52,"value":741},"FLASHINFER_EXTRA_CUDAFLAGS=\"--ptxas-options=--apply-controls=$ACF_FILE\"",{"type":52,"value":743}," (see ",{"type":47,"tag":60,"props":745,"children":747},{"className":746},[],[748],{"type":52,"value":749},"docs\u002Fflashinfer_booster.md:107",{"type":52,"value":369},{"type":47,"tag":82,"props":752,"children":754},{"id":753},"baseline-knockout-branch",[755],{"type":52,"value":756},"Baseline knockout branch",{"type":47,"tag":295,"props":758,"children":760},{"className":297,"code":759,"language":299,"meta":300,"style":300},"def objective(config):\n    if isinstance(config, dict) and not config:   # config == BASELINE_CONFIG\n        return measure_without_acf()              # establish baseline run\n    # config is a hex string (or list with hex tail) — apply ACF\n    ...\n",[761],{"type":47,"tag":60,"props":762,"children":763},{"__ignoreMap":300},[764,772,780,788,796],{"type":47,"tag":306,"props":765,"children":766},{"class":308,"line":309},[767],{"type":47,"tag":306,"props":768,"children":769},{},[770],{"type":52,"value":771},"def objective(config):\n",{"type":47,"tag":306,"props":773,"children":774},{"class":308,"line":318},[775],{"type":47,"tag":306,"props":776,"children":777},{},[778],{"type":52,"value":779},"    if isinstance(config, dict) and not config:   # config == BASELINE_CONFIG\n",{"type":47,"tag":306,"props":781,"children":782},{"class":308,"line":462},[783],{"type":47,"tag":306,"props":784,"children":785},{},[786],{"type":52,"value":787},"        return measure_without_acf()              # establish baseline run\n",{"type":47,"tag":306,"props":789,"children":790},{"class":308,"line":471},[791],{"type":47,"tag":306,"props":792,"children":793},{},[794],{"type":52,"value":795},"    # config is a hex string (or list with hex tail) — apply ACF\n",{"type":47,"tag":306,"props":797,"children":798},{"class":308,"line":480},[799],{"type":47,"tag":306,"props":800,"children":801},{},[802],{"type":52,"value":803},"    ...\n",{"type":47,"tag":82,"props":805,"children":807},{"id":806},"correctness-before-timing-mandatory",[808],{"type":52,"value":809},"Correctness-before-timing (mandatory)",{"type":47,"tag":54,"props":811,"children":812},{},[813,815,820],{"type":52,"value":814},"The optimizer rewards whatever you measure. If you only measure\nlatency, the algorithm will happily reward configs that compile faster by\nproducing wrong answers. ",{"type":47,"tag":337,"props":816,"children":817},{},[818],{"type":52,"value":819},"Always",{"type":52,"value":821}," verify against a reference first:",{"type":47,"tag":295,"props":823,"children":825},{"className":297,"code":824,"language":299,"meta":300,"style":300},"if not torch.allclose(actual, reference, atol=1e-2, rtol=0):\n    return INVALID_SCORE\nreturn triton.testing.do_bench(lambda: kernel(...), warmup=100, rep=1000, return_mode=\"mean\")\n",[826],{"type":47,"tag":60,"props":827,"children":828},{"__ignoreMap":300},[829,837,845],{"type":47,"tag":306,"props":830,"children":831},{"class":308,"line":309},[832],{"type":47,"tag":306,"props":833,"children":834},{},[835],{"type":52,"value":836},"if not torch.allclose(actual, reference, atol=1e-2, rtol=0):\n",{"type":47,"tag":306,"props":838,"children":839},{"class":308,"line":318},[840],{"type":47,"tag":306,"props":841,"children":842},{},[843],{"type":52,"value":844},"    return INVALID_SCORE\n",{"type":47,"tag":306,"props":846,"children":847},{"class":308,"line":462},[848],{"type":47,"tag":306,"props":849,"children":850},{},[851],{"type":52,"value":852},"return triton.testing.do_bench(lambda: kernel(...), warmup=100, rep=1000, return_mode=\"mean\")\n",{"type":47,"tag":54,"props":854,"children":855},{},[856,858,864],{"type":52,"value":857},"(Pattern from ",{"type":47,"tag":60,"props":859,"children":861},{"className":860},[],[862],{"type":52,"value":863},"examples\u002Fcompilers\u002Ftriton_example\u002Fmixed_triton.py:141-146",{"type":52,"value":267},{"type":47,"tag":82,"props":866,"children":868},{"id":867},"catch-everything-return-invalid_score",[869],{"type":52,"value":870},"Catch everything → return INVALID_SCORE",{"type":47,"tag":295,"props":872,"children":874},{"className":297,"code":873,"language":299,"meta":300,"style":300},"try:\n    ...\nexcept (subprocess.TimeoutExpired, RuntimeError, FileNotFoundError, ValueError, OSError) as e:\n    return INVALID_SCORE\n",[875],{"type":47,"tag":60,"props":876,"children":877},{"__ignoreMap":300},[878,886,893,901],{"type":47,"tag":306,"props":879,"children":880},{"class":308,"line":309},[881],{"type":47,"tag":306,"props":882,"children":883},{},[884],{"type":52,"value":885},"try:\n",{"type":47,"tag":306,"props":887,"children":888},{"class":308,"line":318},[889],{"type":47,"tag":306,"props":890,"children":891},{},[892],{"type":52,"value":803},{"type":47,"tag":306,"props":894,"children":895},{"class":308,"line":462},[896],{"type":47,"tag":306,"props":897,"children":898},{},[899],{"type":52,"value":900},"except (subprocess.TimeoutExpired, RuntimeError, FileNotFoundError, ValueError, OSError) as e:\n",{"type":47,"tag":306,"props":902,"children":903},{"class":308,"line":471},[904],{"type":47,"tag":306,"props":905,"children":906},{},[907],{"type":52,"value":844},{"type":47,"tag":54,"props":909,"children":910},{},[911,913,918],{"type":52,"value":912},"When in doubt, catch broadly. CompileIQ expects\n",{"type":47,"tag":60,"props":914,"children":916},{"className":915},[],[917],{"type":52,"value":333},{"type":52,"value":919}," as the \"this config is broken\" signal — re-raising means the\nentire search fails.",{"type":47,"tag":82,"props":921,"children":923},{"id":922},"pre-search-canary-mandatory-before-tunerstart",[924],{"type":52,"value":925},"Pre-search canary (mandatory before tuner.start())",{"type":47,"tag":54,"props":927,"children":928},{},[929],{"type":52,"value":930},"Two cheap calls that catch ~90% of \"every score is the same\" bugs:",{"type":47,"tag":295,"props":932,"children":934},{"className":297,"code":933,"language":299,"meta":300,"style":300},"# Shape check — does the objective even run?\nsample = tuner.sample(1)[0]\nscore = objective(sample)\nprint(f\"sample run: {score}\")\nassert isinstance(score, (int, float)) and score == score   # not NaN\n\n# ACF-injection canary using the Debug pack (downloaded once)\nfrom compileiq.utils.helpers import load_compiler_config\nO0_HEX = load_compiler_config(\"debug-pack\u002FO0.acf\")\nO3_HEX = load_compiler_config(\"debug-pack\u002FO3.acf\")\n\nbaseline = objective({})                  # BASELINE_CONFIG path\nscore_O0 = objective(O0_HEX)\nscore_O3 = objective(O3_HEX)\n\nassert score_O0 > baseline * 1.05, (\n    f\"O0 should regress (got {score_O0} vs baseline {baseline}). \"\n    \"ACF is NOT reaching PTXAS — fix the cache-bust.\"\n)\nassert abs(score_O3 - baseline) \u002F baseline \u003C 0.05, (\n    f\"O3 should match baseline (got {score_O3} vs {baseline}).\"\n)\nprint(\"ACF injection canary PASSED — safe to start the search.\")\n",[935],{"type":47,"tag":60,"props":936,"children":937},{"__ignoreMap":300},[938,946,954,962,970,978,988,997,1005,1014,1023,1031,1040,1049,1058,1066,1075,1084,1093,1102,1111,1120,1128],{"type":47,"tag":306,"props":939,"children":940},{"class":308,"line":309},[941],{"type":47,"tag":306,"props":942,"children":943},{},[944],{"type":52,"value":945},"# Shape check — does the objective even run?\n",{"type":47,"tag":306,"props":947,"children":948},{"class":308,"line":318},[949],{"type":47,"tag":306,"props":950,"children":951},{},[952],{"type":52,"value":953},"sample = tuner.sample(1)[0]\n",{"type":47,"tag":306,"props":955,"children":956},{"class":308,"line":462},[957],{"type":47,"tag":306,"props":958,"children":959},{},[960],{"type":52,"value":961},"score = objective(sample)\n",{"type":47,"tag":306,"props":963,"children":964},{"class":308,"line":471},[965],{"type":47,"tag":306,"props":966,"children":967},{},[968],{"type":52,"value":969},"print(f\"sample run: {score}\")\n",{"type":47,"tag":306,"props":971,"children":972},{"class":308,"line":480},[973],{"type":47,"tag":306,"props":974,"children":975},{},[976],{"type":52,"value":977},"assert isinstance(score, (int, float)) and score == score   # not NaN\n",{"type":47,"tag":306,"props":979,"children":981},{"class":308,"line":980},6,[982],{"type":47,"tag":306,"props":983,"children":985},{"emptyLinePlaceholder":984},true,[986],{"type":52,"value":987},"\n",{"type":47,"tag":306,"props":989,"children":991},{"class":308,"line":990},7,[992],{"type":47,"tag":306,"props":993,"children":994},{},[995],{"type":52,"value":996},"# ACF-injection canary using the Debug pack (downloaded once)\n",{"type":47,"tag":306,"props":998,"children":999},{"class":308,"line":24},[1000],{"type":47,"tag":306,"props":1001,"children":1002},{},[1003],{"type":52,"value":1004},"from compileiq.utils.helpers import load_compiler_config\n",{"type":47,"tag":306,"props":1006,"children":1008},{"class":308,"line":1007},9,[1009],{"type":47,"tag":306,"props":1010,"children":1011},{},[1012],{"type":52,"value":1013},"O0_HEX = load_compiler_config(\"debug-pack\u002FO0.acf\")\n",{"type":47,"tag":306,"props":1015,"children":1017},{"class":308,"line":1016},10,[1018],{"type":47,"tag":306,"props":1019,"children":1020},{},[1021],{"type":52,"value":1022},"O3_HEX = load_compiler_config(\"debug-pack\u002FO3.acf\")\n",{"type":47,"tag":306,"props":1024,"children":1026},{"class":308,"line":1025},11,[1027],{"type":47,"tag":306,"props":1028,"children":1029},{"emptyLinePlaceholder":984},[1030],{"type":52,"value":987},{"type":47,"tag":306,"props":1032,"children":1034},{"class":308,"line":1033},12,[1035],{"type":47,"tag":306,"props":1036,"children":1037},{},[1038],{"type":52,"value":1039},"baseline = objective({})                  # BASELINE_CONFIG path\n",{"type":47,"tag":306,"props":1041,"children":1043},{"class":308,"line":1042},13,[1044],{"type":47,"tag":306,"props":1045,"children":1046},{},[1047],{"type":52,"value":1048},"score_O0 = objective(O0_HEX)\n",{"type":47,"tag":306,"props":1050,"children":1052},{"class":308,"line":1051},14,[1053],{"type":47,"tag":306,"props":1054,"children":1055},{},[1056],{"type":52,"value":1057},"score_O3 = objective(O3_HEX)\n",{"type":47,"tag":306,"props":1059,"children":1061},{"class":308,"line":1060},15,[1062],{"type":47,"tag":306,"props":1063,"children":1064},{"emptyLinePlaceholder":984},[1065],{"type":52,"value":987},{"type":47,"tag":306,"props":1067,"children":1069},{"class":308,"line":1068},16,[1070],{"type":47,"tag":306,"props":1071,"children":1072},{},[1073],{"type":52,"value":1074},"assert score_O0 > baseline * 1.05, (\n",{"type":47,"tag":306,"props":1076,"children":1078},{"class":308,"line":1077},17,[1079],{"type":47,"tag":306,"props":1080,"children":1081},{},[1082],{"type":52,"value":1083},"    f\"O0 should regress (got {score_O0} vs baseline {baseline}). \"\n",{"type":47,"tag":306,"props":1085,"children":1087},{"class":308,"line":1086},18,[1088],{"type":47,"tag":306,"props":1089,"children":1090},{},[1091],{"type":52,"value":1092},"    \"ACF is NOT reaching PTXAS — fix the cache-bust.\"\n",{"type":47,"tag":306,"props":1094,"children":1096},{"class":308,"line":1095},19,[1097],{"type":47,"tag":306,"props":1098,"children":1099},{},[1100],{"type":52,"value":1101},")\n",{"type":47,"tag":306,"props":1103,"children":1105},{"class":308,"line":1104},20,[1106],{"type":47,"tag":306,"props":1107,"children":1108},{},[1109],{"type":52,"value":1110},"assert abs(score_O3 - baseline) \u002F baseline \u003C 0.05, (\n",{"type":47,"tag":306,"props":1112,"children":1114},{"class":308,"line":1113},21,[1115],{"type":47,"tag":306,"props":1116,"children":1117},{},[1118],{"type":52,"value":1119},"    f\"O3 should match baseline (got {score_O3} vs {baseline}).\"\n",{"type":47,"tag":306,"props":1121,"children":1123},{"class":308,"line":1122},22,[1124],{"type":47,"tag":306,"props":1125,"children":1126},{},[1127],{"type":52,"value":1101},{"type":47,"tag":306,"props":1129,"children":1131},{"class":308,"line":1130},23,[1132],{"type":47,"tag":306,"props":1133,"children":1134},{},[1135],{"type":52,"value":1136},"print(\"ACF injection canary PASSED — safe to start the search.\")\n",{"type":47,"tag":54,"props":1138,"children":1139},{},[1140,1142,1147],{"type":52,"value":1141},"If either assertion fails, ",{"type":47,"tag":337,"props":1143,"children":1144},{},[1145],{"type":52,"value":1146},"stop",{"type":52,"value":1148}," and fix the cache-bust before launching\nthe search. Otherwise every generation's score is measurement noise on a stale\nbinary.",{"type":47,"tag":82,"props":1150,"children":1152},{"id":1151},"self-test",[1153],{"type":52,"value":1154},"Self-test",{"type":47,"tag":54,"props":1156,"children":1157},{},[1158],{"type":52,"value":1159},"A 3-line \"smoke\" objective inside the SKILL author's repo, used to verify the\nscaffolding before plugging in a real kernel:",{"type":47,"tag":295,"props":1161,"children":1163},{"className":297,"code":1162,"language":299,"meta":300,"style":300},"def smoke_objective(config):\n    return 1.0   # constant; useful to verify Search() shape, not measurement\n",[1164],{"type":47,"tag":60,"props":1165,"children":1166},{"__ignoreMap":300},[1167,1175],{"type":47,"tag":306,"props":1168,"children":1169},{"class":308,"line":309},[1170],{"type":47,"tag":306,"props":1171,"children":1172},{},[1173],{"type":52,"value":1174},"def smoke_objective(config):\n",{"type":47,"tag":306,"props":1176,"children":1177},{"class":308,"line":318},[1178],{"type":47,"tag":306,"props":1179,"children":1180},{},[1181],{"type":52,"value":1182},"    return 1.0   # constant; useful to verify Search() shape, not measurement\n",{"type":47,"tag":54,"props":1184,"children":1185},{},[1186,1188,1194,1196,1202],{"type":52,"value":1187},"Drop it into the ",{"type":47,"tag":60,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":52,"value":1193},"Search(...)",{"type":52,"value":1195}," call and run 2 generations; if that completes\nand ",{"type":47,"tag":60,"props":1197,"children":1199},{"className":1198},[],[1200],{"type":52,"value":1201},"results.get_best_result()",{"type":52,"value":1203}," returns a dict, your scaffold is correct.",{"type":47,"tag":82,"props":1205,"children":1207},{"id":1206},"gotchas",[1208],{"type":52,"value":1209},"Gotchas",{"type":47,"tag":89,"props":1211,"children":1212},{},[1213,1237,1262,1293],{"type":47,"tag":93,"props":1214,"children":1215},{},[1216,1227,1229,1235],{"type":47,"tag":337,"props":1217,"children":1218},{},[1219,1225],{"type":47,"tag":60,"props":1220,"children":1222},{"className":1221},[],[1223],{"type":52,"value":1224},"PTXAS_OPTIONS",{"type":52,"value":1226}," is not the canonical Triton injection.",{"type":52,"value":1228}," It still works\nfor raw subprocess invocations, but Triton 3.x prefers the\n",{"type":47,"tag":60,"props":1230,"children":1232},{"className":1231},[],[1233],{"type":52,"value":1234},"ptx_options=",{"type":52,"value":1236}," kernel kwarg. See the table above.",{"type":47,"tag":93,"props":1238,"children":1239},{},[1240,1245,1247,1253,1255,1260],{"type":47,"tag":337,"props":1241,"children":1242},{},[1243],{"type":52,"value":1244},"Mixed search spaces require list unpacking.",{"type":52,"value":1246}," If you pass\n",{"type":47,"tag":60,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":52,"value":1252},"search_space=[user_dict, PtxasSearchSpace()]",{"type":52,"value":1254},", your objective must accept\na list, not a string. Results keep that list in ",{"type":47,"tag":60,"props":1256,"children":1258},{"className":1257},[],[1259],{"type":52,"value":249},{"type":52,"value":1261},"; unpack it\nbefore saving the compiler config.",{"type":47,"tag":93,"props":1263,"children":1264},{},[1265,1276,1278,1284,1286,1291],{"type":47,"tag":337,"props":1266,"children":1267},{},[1268,1270,1275],{"type":52,"value":1269},"Don't redefine ",{"type":47,"tag":60,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":52,"value":333},{"type":52,"value":80},{"type":52,"value":1277}," Import it from ",{"type":47,"tag":60,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":52,"value":1283},"compileiq.types",{"type":52,"value":1285},". If\nyou redefine it locally as ",{"type":47,"tag":60,"props":1287,"children":1289},{"className":1288},[],[1290],{"type":52,"value":349},{"type":52,"value":1292},", the value happens to work today\nbut is not guaranteed to in future releases.",{"type":47,"tag":93,"props":1294,"children":1295},{},[1296,1307,1309,1315,1317,1322,1324,1330,1331,1337],{"type":47,"tag":337,"props":1297,"children":1298},{},[1299,1305],{"type":47,"tag":60,"props":1300,"children":1302},{"className":1301},[],[1303],{"type":52,"value":1304},"config_blob",{"type":52,"value":1306}," is no longer a parameter name.",{"type":52,"value":1308}," The old skill set used\n",{"type":47,"tag":60,"props":1310,"children":1312},{"className":1311},[],[1313],{"type":52,"value":1314},"def objective(config_blob)",{"type":52,"value":1316}," and called ",{"type":47,"tag":60,"props":1318,"children":1320},{"className":1319},[],[1321],{"type":52,"value":108},{"type":52,"value":1323},". Both\nare stale. Use ",{"type":47,"tag":60,"props":1325,"children":1327},{"className":1326},[],[1328],{"type":52,"value":1329},"def objective(config)",{"type":52,"value":499},{"type":47,"tag":60,"props":1332,"children":1334},{"className":1333},[],[1335],{"type":52,"value":1336},"save_compiler_config(path, config)",{"type":52,"value":80},{"type":47,"tag":82,"props":1339,"children":1341},{"id":1340},"next",[1342],{"type":52,"value":1343},"Next",{"type":47,"tag":89,"props":1345,"children":1346},{},[1347,1367,1379],{"type":47,"tag":93,"props":1348,"children":1349},{},[1350,1352,1358,1360,1366],{"type":52,"value":1351},"Sizing ",{"type":47,"tag":60,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":52,"value":1357},"SearchConfiguration",{"type":52,"value":1359}," and picking a Worker: ",{"type":47,"tag":60,"props":1361,"children":1363},{"className":1362},[],[1364],{"type":52,"value":1365},"compileiq-run-search",{"type":52,"value":80},{"type":47,"tag":93,"props":1368,"children":1369},{},[1370,1372,1378],{"type":52,"value":1371},"After the search: ",{"type":47,"tag":60,"props":1373,"children":1375},{"className":1374},[],[1376],{"type":52,"value":1377},"compileiq-validate-result",{"type":52,"value":80},{"type":47,"tag":93,"props":1380,"children":1381},{},[1382,1384,1390],{"type":52,"value":1383},"If something's wrong: ",{"type":47,"tag":60,"props":1385,"children":1387},{"className":1386},[],[1388],{"type":52,"value":1389},"compileiq-debug",{"type":52,"value":80},{"type":47,"tag":1392,"props":1393,"children":1394},"style",{},[1395],{"type":52,"value":1396},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1398,"total":990},[1399,1405,1418,1430,1444,1455,1467],{"slug":4,"name":4,"fn":5,"description":6,"org":1400,"tags":1401,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1402,1403,1404],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":1406,"name":1406,"fn":1407,"description":1408,"org":1409,"tags":1410,"stars":20,"repoUrl":21,"updatedAt":1417},"compileiq-booster-pack","apply CompileIQ booster packs to compilers","Use BEFORE running a full CompileIQ search. Walks through downloading a Booster Pack from NVIDIA\u002FCompileIQ GitHub Releases, applying ACF candidates one at a time to the user's compiler (raw PTXAS, NVCC, Triton, Helion, FlashInfer), and keeping only candidates that compile, pass correctness, and beat the no-ACF baseline. Includes the mandatory Debug-pack O0\u002FO3 ACF-injection canary that proves the ACF is reaching PTXAS. Triggers on \"booster pack\", \"ACF\", \"apply-controls\", \"speed up without searching\", \"helion fp8\", \"flashinfer batch decode\", \"debug pack\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1411,1412,1413,1416],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":1414,"slug":1415,"type":15},"Optimization","optimization",{"name":13,"slug":14,"type":15},"2026-07-14T05:32:12.791444",{"slug":1419,"name":1419,"fn":1420,"description":1421,"org":1422,"tags":1423,"stars":20,"repoUrl":21,"updatedAt":1429},"compileiq-bootstrap","bootstrap CompileIQ project environments","Use when starting a fresh CompileIQ project, hitting a socket timeout, or before running any other compileiq-* skill. Verifies CUDA 13.3+, ptxas, GPU access, that `from compileiq.ciq import Search` and friends resolve, and that `PtxasSearchSpace().retrieve()` returns a real path. Documents the env vars that control timeouts, caching, and search-space mirroring. Triggers on \"set up compileiq\", \"compileiq doesn't work\", \"socket timeout\", \"where do search spaces come from\", \"air-gapped compileiq\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1424,1425,1426],{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":1427,"slug":1428,"type":15},"Onboarding","onboarding","2026-07-14T05:32:11.472149",{"slug":1389,"name":1389,"fn":1431,"description":1432,"org":1433,"tags":1434,"stars":20,"repoUrl":21,"updatedAt":1443},"debug CompileIQ search and evaluation failures","Use when something is wrong: Search() hangs, all evaluations return INVALID_SCORE, scores aren't improving, every config returns the same number, ptxas errors fill the log, CV% is too high, or a winning ACF candidate needs NCU profiling to explain. Symptom-indexed table on top. Triggers on \"compileiq hang\", \"socket timeout\", \"INVALID_SCORE\", \"not converging\", \"every score is the same\", \"TypeError fromhex\", \"ncu profile\", \"register spill\", \"ptxas error\", \"not in expected format\", \"high cv\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1435,1438,1441,1442],{"name":1436,"slug":1437,"type":15},"Debugging","debugging",{"name":1439,"slug":1440,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-14T05:32:05.08078",{"slug":1365,"name":1365,"fn":1445,"description":1446,"org":1447,"tags":1448,"stars":20,"repoUrl":21,"updatedAt":1454},"execute CompileIQ search workflows","Use when composing the Search(...) call and calling .start(). Covers the four worker classes (MultiProcessWorker \u002F IsoMultiProcessWorker \u002F RayWorker \u002F AsyncWorker) and when to pick each, SearchConfiguration sizing rules, dump_results checkpointing, tracker_config choice (Disabled \u002F Loguru \u002F MLflow), num_workers\u002Ftask_timeout semantics, and GPU clock locking for stable measurements. Triggers on \"Search()\", \"tuner.start()\", \"pool_size\", \"num_workers\", \"task_timeout\", \"IsoMultiProcessWorker\", \"RayWorker\", \"dump_results\", \"MLflow\", \"GPU clocks\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1449,1452,1453],{"name":1450,"slug":1451,"type":15},"Automation","automation",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-14T05:32:08.913442",{"slug":1456,"name":1456,"fn":1457,"description":1458,"org":1459,"tags":1460,"stars":20,"repoUrl":21,"updatedAt":1466},"compileiq-search-space","configure CompileIQ search spaces","Use when picking the search_space= argument for Search(). Covers the three provider classes (PtxasSearchSpace, NvccSearchSpace, LocalSearchSpaceBin), how to pin a version\u002Fvariant\u002Ftag, the attention-focused 'att' variant for attention kernels (FlashAttention, GQA, MHA, MLA, FlashInfer Batch Decode), air-gapped mirroring via CIQ_SEARCH_SPACES_DIR, and custom user-defined search spaces built from compileiq.search_spaces.base primitives. Triggers on \"search space\", \"PtxasSearchSpace\", \"NvccSearchSpace\", \"air-gapped compileiq\", \"offline compileiq\", \"CIQ_SEARCH_SPACES_DIR\", \"attention variant\", \"ptxas att\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1461,1464,1465],{"name":1462,"slug":1463,"type":15},"Configuration","configuration",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-14T05:32:07.605639",{"slug":1377,"name":1377,"fn":1468,"description":1469,"org":1470,"tags":1471,"stars":20,"repoUrl":21,"updatedAt":1480},"validate CompileIQ search results","Use AFTER a Search has completed and BEFORE claiming any speedup or shipping an ACF. Loads the dump_results CSV, extracts top-K candidates (single-objective) or the Pareto front (multi-objective), re-measures each against the no-ACF baseline with 100+ trials on fresh caches, runs Welch's t-test plus Cohen's d, rejects three classic false-positive patterns (lucky-min \u002F higher-variance \u002F multiple-comparisons-of-N), and saves the validated winner as best.acf. Triggers on \"validate result\", \"extract best config\", \"Welch's t-test\", \"is my speedup real\", \"save best ACF\", \"pareto front\", \"claim speedup\", \"ship config\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1472,1475,1476,1477],{"name":1473,"slug":1474,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":1478,"slug":1479,"type":15},"QA","qa","2026-07-14T05:32:06.343444",{"items":1482,"total":1634},[1483,1501,1518,1529,1541,1553,1566,1580,1591,1602,1616,1625],{"slug":1484,"name":1484,"fn":1485,"description":1486,"org":1487,"tags":1488,"stars":1498,"repoUrl":1499,"updatedAt":1500},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1489,1492,1495],{"name":1490,"slug":1491,"type":15},"Documentation","documentation",{"name":1493,"slug":1494,"type":15},"MCP","mcp",{"name":1496,"slug":1497,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":1502,"name":1502,"fn":1503,"description":1504,"org":1505,"tags":1506,"stars":1515,"repoUrl":1516,"updatedAt":1517},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1507,1510,1513],{"name":1508,"slug":1509,"type":15},"Containers","containers",{"name":1511,"slug":1512,"type":15},"Deployment","deployment",{"name":1514,"slug":299,"type":15},"Python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":1519,"name":1519,"fn":1520,"description":1521,"org":1522,"tags":1523,"stars":1515,"repoUrl":1516,"updatedAt":1528},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1524,1527],{"name":1525,"slug":1526,"type":15},"CI\u002FCD","ci-cd",{"name":1511,"slug":1512,"type":15},"2026-07-14T05:25:59.97109",{"slug":1530,"name":1530,"fn":1531,"description":1532,"org":1533,"tags":1534,"stars":1515,"repoUrl":1516,"updatedAt":1540},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1535,1536,1537],{"name":1525,"slug":1526,"type":15},{"name":1511,"slug":1512,"type":15},{"name":1538,"slug":1539,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":1542,"name":1542,"fn":1543,"description":1544,"org":1545,"tags":1546,"stars":1515,"repoUrl":1516,"updatedAt":1552},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1547,1548,1549],{"name":1436,"slug":1437,"type":15},{"name":1538,"slug":1539,"type":15},{"name":1550,"slug":1551,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":1554,"name":1554,"fn":1555,"description":1556,"org":1557,"tags":1558,"stars":1515,"repoUrl":1516,"updatedAt":1565},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1559,1562],{"name":1560,"slug":1561,"type":15},"Best Practices","best-practices",{"name":1563,"slug":1564,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":1567,"name":1567,"fn":1568,"description":1569,"org":1570,"tags":1571,"stars":1515,"repoUrl":1516,"updatedAt":1579},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1572,1575,1578],{"name":1573,"slug":1574,"type":15},"Machine Learning","machine-learning",{"name":1576,"slug":1577,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":1581,"name":1581,"fn":1582,"description":1583,"org":1584,"tags":1585,"stars":1515,"repoUrl":1516,"updatedAt":1590},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1586,1587],{"name":1478,"slug":1479,"type":15},{"name":1588,"slug":1589,"type":15},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":1592,"name":1592,"fn":1593,"description":1594,"org":1595,"tags":1596,"stars":1515,"repoUrl":1516,"updatedAt":1601},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1597,1598],{"name":1511,"slug":1512,"type":15},{"name":1599,"slug":1600,"type":15},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":1603,"name":1603,"fn":1604,"description":1605,"org":1606,"tags":1607,"stars":1515,"repoUrl":1516,"updatedAt":1615},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1608,1611,1612],{"name":1609,"slug":1610,"type":15},"Code Review","code-review",{"name":1538,"slug":1539,"type":15},{"name":1613,"slug":1614,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":1617,"name":1617,"fn":1618,"description":1619,"org":1620,"tags":1621,"stars":1515,"repoUrl":1516,"updatedAt":1624},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1622,1623],{"name":1478,"slug":1479,"type":15},{"name":1588,"slug":1589,"type":15},"2026-07-14T05:25:54.928983",{"slug":1626,"name":1626,"fn":1627,"description":1628,"org":1629,"tags":1630,"stars":1515,"repoUrl":1516,"updatedAt":1633},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1631,1632],{"name":1450,"slug":1451,"type":15},{"name":1525,"slug":1526,"type":15},"2026-07-30T05:29:03.275638",496]