Repository navigation
[FlyDSL] Fix/flydsl 051 gfx942 down scale views - #8448
Conversation
….5.1 FlyDSL 0.5.1 (ROCm/FlyDSL#1407) refuses a tiled-MMA fragment whose static extent is not a multiple of the tile. The gfx942 Down kernels broadcast the per-channel weight scale into the C fragment through a stride-0 view whose token (MMA N) mode has extent 1, against an N tile of 16. FlyDSL 0.5.0 padded that mode to 16 silently; since the stride is 0 every padded column read the same address, so the result was right. 0.5.1 rejects it, so every gfx942 whole-MoE prefill row failed to compile its Down kernel with: MmaMakeFragmentOp: the N extent 1 is not a multiple of the tiled MMA's N tile 16; the fragment would reach past the view Give that mode the full tile width (16) with stride 0, which is what 0.5.0 padded it to: - gemm2_1x4.py: ((4,2,2,4,4), 1) -> ((4,2,2,4,4), 16) for the LDS scale view. - gemm2.py: (N, 1) -> (N, 16) for the per_tensor and ptpc weight-scale views, and the matching flat_divide tile (BLOCK_N, 1) -> (BLOCK_N, 16). Verified on MI308X (gfx942): - FlyDSL 0.5.1: op_tests/test_flydsl_moe_gfx942.py passes (failed before on the first 1x4 Down compile); every valid config of get_tune_space() x {no, per_tensor, ptpc} compiles and matches the reference. - FlyDSL 0.5.0, before vs after: the final ISA of every Down kernel the shipped prefill rows and the tune space reach (15 distinct compilations, default prefill and 1x4, per_tensor and ptpc) is identical apart from the source line numbers in asm_mark comments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
FlyDSL 0.5.1 (ROCm/FlyDSL ae8f35dfa) makes get_rocm_arch() raise when no
GPU is detected and FLYDSL_GPU_ARCH is unset; 0.5.0 fell back to gfx942.
- hstu_attention, linear_attention_kernels and
linear_attention_prefill_kernels read the arch into module constants at
import, so importing them on a GPU-less host (e.g. collecting their tests
on a CPU runner) now failed. Resolve it where it is used instead;
get_rocm_arch() caches the hardware probe, and an AOT dry run now sees
the FLYDSL_GPU_ARCH it sets rather than whatever was set at import.
- aot_cache._target_arch(): without a device, only FLYDSL_GPU_ARCH (which
the AOT dry run always sets) names the target. Raise a clear error when it
is unset instead of probing or guessing; 0.5.0's gfx942 fallback filed
entries under the wrong arch on any other target.
- Drop the K5 opt kernel's flydsl>=0.2.0 check: aiter.ops.flydsl already
requires >=0.5.0 at import, so it could never fire.
Verified on MI308X with FlyDSL 0.5.1: the three modules import with no GPU
tool on PATH and HIP/ROCR devices hidden (two failed before);
_target_arch() gives gfx942 with a device, the FLYDSL_GPU_ARCH value
(lower-cased) when set, and the new error with neither. Passing:
test_flydsl_hstu_attention{,_bwd}, test_flydsl_linear_attention{,_prefill},
test_flydsl_gdr_mtp, tests/test_flydsl_aot_cache.py and
test_flydsl_moe_gfx942.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
…che key - op_tests/test_flydsl_hstu_attention.py: the tuned-CSV tests still read hstu_attention._GPU_ARCH, removed in the previous commit, so test_tuned_csv_is_picked_up and test_tuned_csv_best_duration_wins failed with AttributeError under pytest (CI runs the file as a script, which only reaches main()). Use get_rocm_arch(), as _get_tuned_config now does. - aot_cache._target_arch(): with no device visible to torch, resolve the target through get_rocm_arch() as FlyDSL's compiler does, so HSA_OVERRIDE_GFX_VERSION and the rocm_agent_enumerator / rocminfo probe are honored again; FlyDSL >= 0.5.1 raises itself when nothing names a target. Keep refusing on FlyDSL 0.5.0 without an override, where get_rocm_arch() would guess gfx942. Verified with FlyDSL 0.5.1 on MI308X: pytest -k tuned_csv 3 passed (2 failed before); _target_arch() gives gfx942 with a device, the lower-cased FLYDSL_GPU_ARCH when set, gfx942 for no device + HSA_OVERRIDE_GFX_VERSION=9.4.2 and for no device + hardware probe, and FlyDSL's error with none of them. FlyDSL 0.5.0: raises with no device and no override, honors HSA_OVERRIDE_GFX_VERSION. tests/test_flydsl_aot_cache.py passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.30.post1 took the FlyDSL 0.5.3 bump without ROCm/aiter#8448, which gfx942 FP8 MoE prefill Down kernels need to compile under FlyDSL >= 0.5.1. v0.1.30.post2 is post1 plus vllm-project#8448 and a hipCCL JIT header fix. Co-Authored-By: Claude <[email protected]> Signed-off-by: josh schell <[email protected]>
…he tuned-rows helper Review item 4: main() gated on get_gfx() (the last GPU_ARCHS entry) while the perf rows record get_gfx_runtime(); both now use the running card. The merge of main brought #8448, which replaced the module constant `hstu_attention._GPU_ARCH` with `get_rocm_arch()`. `_tuned_rows_for` still read the constant, so test_flydsl_hstu_attention_tuned_rows_select_kernel raised AttributeError; it now keys on get_rocm_arch() as the loader does. Co-Authored-By: Claude <[email protected]>
Summary
Motivation
Changes
Performance (if applicable)
Testing
Documentation
Dependencies
Breaking Changes
PR Self-Review
Reviewed revision
Behavior and intent
Validation and unverified scope
PR-specific question
Changed op tests