Skip to content

[autotuner][cute] demote tcgen05_tvm_ffi_launch to a seed-only knob - #3149

Draft
calebmkim wants to merge 1 commit into
calebmkim/stack/32from
calebmkim/stack/33
Draft

[autotuner][cute] demote tcgen05_tvm_ffi_launch to a seed-only knob#3149
calebmkim wants to merge 1 commit into
calebmkim/stack/32from
calebmkim/stack/33

Conversation

@calebmkim

@calebmkim calebmkim commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Stacked PRs:


[autotuner][cute] demote tcgen05_tvm_ffi_launch to a seed-only knob

Pinned to EnumFragment((True,)) in the search view, the FFI-launch flag caused
(1) population collapse -- every candidate forced ffi=True so the promotion
normalizer deduped the whole surface to one seed -- and (2) an encoder crash when a
partial seed back-filled default False into a (True,)-only slot ("Invalid enum
value False").

Fix: EnumFragment((True, False), search_choices=(False,)). Search draws only False
(FFI enters solely via the existing eligibility-gated CuteTcgen05ClusterM2FfiHeuristic
seed, #2681); choices carries True so the seed round-trips and default_config() still
promotes on eligible shapes.

Effect (single B200): distinct configs in a 400-draw search population on S3
2048x4096x4096 bf16, 2 -> 17, and a full S3 autotune now runs to completion with
heuristics on, with zero "Invalid enum value False" encoder crashes (the partial
formula seed that omits the key no longer aborts surrogate encoding at config #2).

SCOPE: this fixes one of the SIX clauses in target1_tvm_ffi_promotion_requested,
which is what gates the wholesale projection onto the FFI seed. The other five
(tcgen05_flat_role_coordinates, tcgen05_layout_strategy='explicit_epi_tile', and the
three tcgen05_layout_overrides
* keys) are still independent search draws, so ~95% of
candidates continue to trip the gate and be overwritten (measured on this commit:
293/300 candidates -> 1 distinct config, with 0 of 30 keys varying). The 2 -> 17 gain
above is real but partial: it comes from restoring the small subset of draws that
escape all six clauses. The follow-up commit repairs those candidates away from the
FFI envelope instead of onto it, which is what actually restores a multi-config
search (299/300 distinct).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Pinned to EnumFragment((True,)) in the search view, the FFI-launch flag caused
(1) population collapse -- every candidate forced ffi=True so the promotion
normalizer deduped the whole surface to one seed -- and (2) an encoder crash when a
partial seed back-filled default False into a (True,)-only slot ("Invalid enum
value False").

Fix: EnumFragment((True, False), search_choices=(False,)). Search draws only False
(FFI enters solely via the existing eligibility-gated CuteTcgen05ClusterM2FfiHeuristic
seed, #2681); choices carries True so the seed round-trips and default_config() still
promotes on eligible shapes.

Effect (single B200): distinct configs in a 400-draw search population on S3
2048x4096x4096 bf16, 2 -> 17, and a full S3 autotune now runs to completion with
heuristics on, with zero "Invalid enum value False" encoder crashes (the partial
formula seed that omits the key no longer aborts surrogate encoding at config #2).

SCOPE: this fixes one of the SIX clauses in _target1_tvm_ffi_promotion_requested,
which is what gates the wholesale projection onto the FFI seed. The other five
(tcgen05_flat_role_coordinates, tcgen05_layout_strategy='explicit_epi_tile', and the
three tcgen05_layout_overrides_* keys) are still independent search draws, so ~95% of
candidates continue to trip the gate and be overwritten (measured on this commit:
293/300 candidates -> 1 distinct config, with 0 of 30 keys varying). The 2 -> 17 gain
above is real but partial: it comes from restoring the small subset of draws that
escape all six clauses. The follow-up commit repairs those candidates away from the
FFI envelope instead of onto it, which is what actually restores a multi-config
search (299/300 distinct).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

stack-info: PR: #3149, branch: calebmkim/stack/33
@calebmkim
calebmkim changed the base branch from calebmkim/stack/32 to main July 27, 2026 22:13
@calebmkim
calebmkim force-pushed the calebmkim/stack/33 branch from 1598311 to cd3befd Compare July 27, 2026 22:13
@calebmkim
calebmkim changed the base branch from main to calebmkim/stack/32 July 27, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant