Add flydsl2flydsl examples with L1/L2/L3 compute-pattern grouping#43
Add flydsl2flydsl examples with L1/L2/L3 compute-pattern grouping#43johayang-amd wants to merge 11 commits into
Conversation
|
Thank you so much for your contribution. It's very helpful. Here are some comments from my side: Comment 1 — required validation process for new tasks For this project, every newly added task should be validated by the Task Validator Agent before merge. Please run the Task Validator Agent across all new FlyDSL tasks added in this PR, using the latest available Codex or Claude Code models, and please include the validation results in the PR. This is especially important here because the PR adds many new benchmark tasks and several catalog-only entries; we need confirmation that each runnable task has valid config, prompt construction, compile command, correctness command, performance command, and expected platform support behavior. Comment 2 — blocker: pa_decode_fp8_kernel config still points to removed API tasks/flydsl2flydsl/pa_decode_fp8_kernel/config.yaml still references the old API: build_pa_decode_module build_ps_reduce_kernel build_v2_reduce_kernel But the updated kernel.py in this PR appears to use the FlyDSL v0.2.0 persistent-scheduling API instead, with entries such as compile_pa_decode_ps, pa_decode_ps_launch, get_pa_metadata, and get_sw_ps_max_context_partition_num. The old build_* symbols are no longer defined. That means the current compile command: python3 -c "from kernel import build_pa_decode_module; build_pa_decode_module(1, 1, 1); print('compile ok')" will fail at import time, so this active task cannot reach correctness or performance validation. Please update compile_command and target_kernel_functions to match the real v0.2.0 API, or add explicit compatibility aliases if that is intentional. Ideally this should match the actual harness entrypoints. |
625fbbc to
a4d36e7
Compare
Hi @irvineoy , thank you so much for the thorough review and the helpful comments. I've updated the PR according to your comments. Comment 1 — We ran the Task Validator (via Cursor, on MI300X / gfx942) across all runnable FlyDSL tasks in this PR, and the per-task validation_report.yaml files plus an aggregated summary are now updated in the PR (latest commit a4d36e7). 12 active (gfx942) — all PASS, 10/10 checks each. Comment 2 — Good catch, and thank you for flagging it. This is already addressed in the current head: pa_decode_fp8_kernel/config.yaml no longer references the removed build_* symbols and now matches the v0.2.0 API (compile_pa_decode_ps, get_pa_metadata, get_sw_ps_max_context_partition_num, pa_decode_ps_launch). Would you mind re-checking at a4d36e7? The older build_* references were likely from an earlier commit. Thanks again for taking the time to look through this! |
|
Hi, quick heads-up: we are currently working on a larger refactor #48 that moves the benchmark/runtime flow to a Docker-first environment. This touches a lot of shared infrastructure, so reviews and merges may be slower than usual for a bit. Once that refactor lands, I’ll help rebase open PRs onto that one. Sorry for the delay, and thanks for your patience. |
…ouping) Add eight FlyDSL kernel examples ported from ROCm/FlyDSL kernels/, with the vendored kernels/ helper modules they import, plus a README that groups all flydsl2flydsl tasks by compute pattern (L1/L2/L3). New tasks: topk_gating_softmax, moe_sorting, silu_and_mul_fq, blockscale_preshuffle_gemm, fp8_gemm_4wave, fp8_gemm_8wave, preshuffle_gemm_v2, pa_decode_swa.
…g gfx1250/RDNA kernels Align every flydsl2flydsl task's kernel.py, shared kernels/ modules, and config.yaml to FlyDSL v0.2.0 (commit 28a18d3) so the benchmark dataset is a reproducible, version-pinned snapshot. Add catalog task entries for gfx1250/RDNA-only kernels (not runnable on gfx942) plus ARCH_SUPPORT.md documenting the architecture support matrix and skip reasons. Co-authored-by: Cursor <cursoragent@cursor.com>
…nesses to v0.2.0 API Align the three failing harnesses with FlyDSL v0.2.0 tests/kernels: - hgemm_splitk: drop nonexistent hgemm_shuffle_b, pass bias=None, and use the official gfx942 shapes + explicit tuning kwargs (14/14 correctness on gfx942). - flash_attn_func: relax the bf16 tolerance to 3e-2 to match upstream (10/10 correctness on gfx942). - pa_decode_fp8: rewrite onto the real v0.2.0 PS API (pa_decode_ps_launch / get_pa_metadata / get_sw_ps_max_context_partition_num) with aiter-backed fp8 KV quantization and the torch_mha_extend reference; requires an aiter-enabled runtime image. Co-authored-by: Cursor <cursoragent@cursor.com>
…ctive set 12 PASS / 0 WARN) Convert the two remaining self-reference correctness oracles to genuine independent references so check 7 (correctness_implementation_review) is PASS: - pa_decode_swa: dequantize the fp8 paged KV cache and compute sliding-window GQA decode attention in fp32 (reference_swa_decode); compare kernel bf16 output (ATOL=3e-2). Observed max_err ~3-5e-3 across 5 shapes. - silu_and_mul_fq: compute silu(gate)*up in fp32, re-quantize to MXFP4 (e2m1 + per-32 e8m0 block scale) with the kernel's exact scheme, decode the kernel's packed fp4 output and compare. e8m0 block scales match exactly and all e2m1 codes match (grid_tie_frac=0.0) across 5 shapes. Regenerated all validation_report.yaml. Active set: 12 PASS / 0 WARN / 0 FAIL (pa_decode_fp8 excluded from the default gate: external aiter dependency). Co-authored-by: Cursor <cursoragent@cursor.com>
a4d36e7 to
dd8c895
Compare
|
Hi, thanks again for the PR! I rebased this branch onto latest While validating the new FlyDSL tasks, I fixed a few issues reported by the task validator, including some task-level correctness / compatibility issues. I also added framework support for the new One question about There are still several skip/catalog tasks with schema and packaging issues that are not trivial to fix. Do you want to include them in this PR, or should we move them to a follow-up PR? The affected tasks are:
|
Remove gfx1250/RDNA skip tasks that are not runnable on MI300X (gfx942) and still carry schema/packaging issues. Preserved unchanged on branch flydsl2flydsl-skip-tasks-parked for later work. Removed: - gemm_fp8fp4_gfx1250_kernel - wmma_gemm_gfx1250_kernel - moe_gemm_2stage_mxscale_gfx1250_kernel - moe_gemm_2stage_wmma_gfx1250_kernel - rdna3_f16_gemm_kernel - rdna_f16_gemm_kernel - rdna_fp8_preshuffle_gemm_kernel Co-authored-by: Cursor <cursoragent@cursor.com>
All remaining tasks vendor their own kernels/ subfolder, so the shared top-level tasks/flydsl2flydsl/kernels/ is no longer referenced. Remove it and update README to describe per-task vendoring. Preserved on branch flydsl2flydsl-skip-tasks-parked. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the removed gfx1250/RDNA task rows and the unwrapped-candidate table (both preserved on flydsl2flydsl-skip-tasks-parked), point them at the parked branch, and update notes for per-task vendored kernels/. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@irvineoy Thanks for the comments! I've addressed both of your questions:
I also updated Heads-up: the branch currently conflicts with main after #54 (multi-GPU parallel Docker runner). Those are all in the Docker/runner area (your changes), none overlap with my flydsl task edits. |
Summary
Adds new
flydsl2flydslbenchmark tasks ported from ROCm/FlyDSLkernels/, each withkernel.py,config.yaml, and an execution harness:It also:
tasks/flydsl2flydsl/kernels/(e.g.kernels_common.py,tensor_shim.py,mfma_*,fp8_gemm_utils,preshuffle_gemm,dpp_utils), so each task is self-contained.tasks/flydsl2flydsl/README.mdto group allflydsl2flydsltasks by compute pattern rather than an arbitrary difficulty scale:Validation
All runnable tasks were validated with the Task Validator (run via Cursor on MI300X / gfx942). Per-task
validation_report.yamlfiles and an aggregated summary are included in the PR.blockscale_preshuffle_gemm,flash_attn_func,fused_rope_cache,hgemm_splitk,layernorm,moe_sorting,pa_decode_swa,preshuffle_gemm_v2,rmsnorm,silu_and_mul_fq,softmax,topk_gating_softmax.fp8_gemm_4wave,fp8_gemm_8wave— CDNA4-only 16Bbuffer_load_lds), gfx1250 ×4, rdna/rdna3 ×3.pa_decode_fp8— depends on the externalaiterruntime; it compiles and passes correctness/performance in an aiter-enabled image, but self-containment intentionally fails, so it is excluded from the default gate.Correctness for every active task compares against a genuine independent reference (PyTorch/CPU), not a kernel-vs-kernel self-reference.