Repository navigation
feat(hip-kernel-provider): FlyDSL kernels: RMSNorm fwd/bwd + SDPA forward (RDNA, CDNA) - #13712
Closed
BradPepersAMD wants to merge 1 commit into
Closed
BradPepersAMD wants to merge 1 commit into
BradPepersAMD wants to merge 1 commit into
Conversation
This was referenced Oct 15, 2026
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
⏳ Waiting for required checks to start or finish:
|
BradPepersAMD
force-pushed
the
users/brpepers/flydsl-1-pipeline-rmsnorm
branch
3 times, most recently
from
October 17, 2026 01:56
3fbaae0 to
5c61ca9
Compare
BradPepersAMD
force-pushed
the
users/brpepers/flydsl-1-pipeline-rmsnorm
branch
from
October 17, 2026 14:16
5c61ca9 to
3baec67
Compare
BradPepersAMD
added a commit
that referenced
this pull request
Oct 21, 2026
…SNorm forward/backward, SDPA forward (RDNA, CDNA) Adds FlyDSL as a second kernel source for the kernel ingestor, beside rocKE: ahead-of-time compiled code objects with generated descriptors, packed into each architecture's kpack shard by the provider's shared packer. Neither the build nor the runtime needs FlyDSL or a kernel compiler. Engines (each with graph match, kernel match, score and dispatch symbols): - hipkernel:flydsl_rmsnorm: RMSNorm forward, inference and training (inv_rms); bf16/f16/f32 and an f32 scale beside 16-bit data; epsilon as a kernel argument; baked widths chosen by measurement plus a runtime-N tier. - hipkernel:flydsl_rmsnorm_bwd: dx and dgamma from FlyDSL's deterministic two-stage kernel (partial + reduce in one object; dgamma bitwise reproducible); baked widths and bounded runtime-N tiers. - hipkernel:flydsl_sdpa_rdna, _rdna_decode, _aiw: SDPA forward for gfx11-generic and gfx12-generic (AITER's RDNA kernel ported to gfx11 WMMA, split-KV decode with merge, AOTriton's gfx1201 kernel). - hipkernel:flydsl_sdpa_cdna, _cdna_decode, _cdna_dualwave: SDPA forward for gfx90a, gfx942 and gfx950 from FlyDSL's MFMA kernels. Targets gfx11-generic, gfx12-generic, gfx90a, gfx942 and gfx950; 1,453 objects. The objects, their manifests and KDPs are stored with DVC on the repository's existing remote: git holds one FlyDSL/<op>/<target>.dvc sidecar per directory. With FlyDSL on and a directory not pulled, configure fails with the dvc pull command. The Windows hipDNN superbuild lane pulls them before configure. Gated by HIPKERNELPROVIDER_ENABLE_FLYDSL (ON) under HIPDNN_ENABLE_KERNEL_INGESTOR (OFF by default), so a default build is unchanged. gen_descriptors.py --check (before the pack) and tools/check_shards.py (after) verify every object's SHA256, target and input digest; regeneration is byte-reproducible with the pinned toolchain (flydsl/REGEN.md). Vendored sources keep their upstream notices; flydsl/THIRD_PARTY_LICENSES.md carries the FlyDSL/AITER (Apache-2.0) and AOTriton (MIT) texts. Rules and gaps: flydsl/COVERAGE.md. Also: KernelCompileOptions gains an arch-only constructor; TestContainer's engine buffer bound rises from 8 to 32. Folds in what was reviewed as #13712, #13713 and #13714; supersedes #13157 and #13888. JIRA ID: ALMIOPEN-2953 JIRA ID: ALMIOPEN-2954 JIRA ID: ALMIOPEN-2955 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BradPepersAMD
force-pushed
the
users/brpepers/flydsl-1-pipeline-rmsnorm
branch
from
October 21, 2026 01:48
303f4de to
d7f1dec
Compare
…SNorm forward/backward, SDPA forward (RDNA, CDNA) Adds FlyDSL as a second kernel source for the kernel ingestor, beside rocKE: ahead-of-time compiled code objects with generated descriptors, packed into each architecture's kpack shard by the provider's shared packer. Neither the build nor the runtime needs FlyDSL or a kernel compiler. Engines (each with graph match, kernel match, score and dispatch symbols): - hipkernel:flydsl_rmsnorm: RMSNorm forward, inference and training (inv_rms); bf16/f16/f32 and an f32 scale beside 16-bit data; epsilon as a kernel argument; baked widths chosen by measurement plus a runtime-N tier. - hipkernel:flydsl_rmsnorm_bwd: dx and dgamma from FlyDSL's deterministic two-stage kernel (partial + reduce in one object; dgamma bitwise reproducible); baked widths and bounded runtime-N tiers. - hipkernel:flydsl_sdpa_rdna, _rdna_decode, _aiw: SDPA forward for gfx11-generic and gfx12-generic (AITER's RDNA kernel ported to gfx11 WMMA, split-KV decode with merge, AOTriton's gfx1201 kernel). - hipkernel:flydsl_sdpa_cdna, _cdna_decode, _cdna_dualwave: SDPA forward for gfx90a, gfx942 and gfx950 from FlyDSL's MFMA kernels. Targets gfx11-generic, gfx12-generic, gfx90a, gfx942 and gfx950; 1,453 objects. The objects, their manifests and KDPs are stored with DVC on the `ingestor` remote, as rocKE's large descriptor files are: git holds one FlyDSL/<op>/<target>.dvc pointer per directory. The provider's configure-time DVC check now covers FlyDSL's pointers too (warn and ship nothing for that target; an error under HIPKERNELPROVIDER_REQUIRE_DVC_DESCRIPTORS, which the superbuild CI sets), and the CI's existing recursive pull fetches them. Gated by HIPKERNELPROVIDER_ENABLE_FLYDSL (ON) under HIPDNN_ENABLE_KERNEL_INGESTOR (OFF by default), so a default build is unchanged. gen_descriptors.py --check (before the pack) and tools/check_shards.py (after) verify every object's SHA256, target and input digest; regeneration is byte-reproducible with the pinned toolchain (flydsl/REGEN.md). Vendored sources keep their upstream notices; flydsl/THIRD_PARTY_LICENSES.md carries the FlyDSL/AITER (Apache-2.0) and AOTriton (MIT) texts. Rules and gaps: flydsl/COVERAGE.md. Also: KernelCompileOptions gains an arch-only constructor; TestContainer's engine buffer bound rises from 8 to 32. Folds in what was reviewed as #13712, #13713 and #13714; supersedes #13157 and #13888. JIRA ID: ALMIOPEN-2953 JIRA ID: ALMIOPEN-2954 JIRA ID: ALMIOPEN-2955 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BradPepersAMD
force-pushed
the
users/brpepers/flydsl-1-pipeline-rmsnorm
branch
from
October 21, 2026 13:44
d7f1dec to
77767e4
Compare
Contributor
Author
adickin-amd
pushed a commit
that referenced
this pull request
Oct 30, 2026
…ward (RDNA, CDNA) (#14111) JIRA ID: ALMIOPEN-2953, ALMIOPEN-2954, ALMIOPEN-2955 Supersedes #13712, #13713 and #13714. ## Summary Adds **FlyDSL** as a second kernel source for the hip-kernel-provider's kernel ingestor, beside rocKE: a pipeline that ships prebuilt FlyDSL code objects, and eight engines on it. | Area | Engines | Targets | |---|---|---| | RMSNorm | `hipkernel:flydsl_rmsnorm` (inference and training forward), `hipkernel:flydsl_rmsnorm_bwd` (dx, dgamma) | gfx11-generic, gfx12-generic, gfx90a, gfx942, gfx950 | | SDPA forward, RDNA | `hipkernel:flydsl_sdpa_rdna`, `hipkernel:flydsl_sdpa_rdna_decode`, `hipkernel:flydsl_sdpa_aiw` (gfx12 only) | gfx11-generic, gfx12-generic | | SDPA forward, CDNA | `hipkernel:flydsl_sdpa_cdna`, `hipkernel:flydsl_sdpa_cdna_decode`, `hipkernel:flydsl_sdpa_cdna_dualwave` (gfx950 only) | gfx90a, gfx942, gfx950 | ## How it works - **Prebuilt objects, no compiler at build or run time.** FlyDSL kernels are compiled ahead of time into code objects (`.hsaco`). `flydsl/gen_descriptors.py` generates their descriptors as a `FlyDSL/` bundle, and the provider's existing packer puts them in each arch's kpack shard. Neither the build nor the runtime needs FlyDSL, a kernel compiler or Python at run time. - **Objects live in DVC.** Each `FlyDSL/<op>/<target>/` directory (1,453 objects, about 29 MB) is a DVC output on the `ingestor` remote that rocKE's descriptors use; git holds the 22 `.dvc` sidecars, the op-level descriptors, the generators and docs. Fetch with `dvc pull -r ingestor dnn-providers/hip-kernel-provider/src/engines/kernel_ingestor_engine/descriptors/FlyDSL/*/*.dvc`. The provider's configure-time DVC check covers FlyDSL: a missing directory warns and that target ships no FlyDSL kernels; `HIPKERNELPROVIDER_REQUIRE_DVC_DESCRIPTORS=ON` (CI, release) makes it an error. - **Integrity.** Each `manifest.json` records every object's SHA256 and a digest of that op's own sources. `gen_descriptors.py --check` runs before every pack and fails on any mismatch, so a source edit without regeneration fails the build; `check_shards.py` verifies every shard after the pack. Regeneration is byte-reproducible with the pinned toolchain (`REGEN.md`). - **Generic targets.** RDNA objects are built once for `gfx11-generic` / `gfx12-generic` and copied into every member arch's shard. - **Runtime arguments.** Shapes, strides, head counts, scale, epsilon, mask bounds, bias strides and the LSE output are kernel arguments, so one object serves every shape of its class. Only tiling, head-dim tiers and measured RMSNorm widths are baked. - **Declines.** Each matcher gates every graph field it reads and declines everything else, so another engine gets the plan. `flydsl/COVERAGE.md` lists every accept and decline rule with its test. ## What each engine serves - **RMSNorm** (153 objects per target): bf16, f16, f32, and bf16/f16 with an f32 scale; training forward writes a per-row f32 inv_rms; any finite epsilon, fixed or pass-by-value; the frontend's normalized-axes rule (including cuDNN's `x {B*S, D, 1, 1}` layout). Backward is FlyDSL's deterministic two-stage kernel (dgamma bitwise reproducible). Baked widths were kept only where they measured at least 15% over the generic tier on two archs. - **SDPA RDNA:** bf16/f16 at head_dim 64/96/128/256 plus generic tiers for any multiple of 8 up to 256; causal at either corner, bands, sliding windows; additive bias (f32 or the query dtype, any broadcast); attention sinks; MLA 192/128 and wide single-KV-head decode (576/512, 512/512); MHA/GQA/MQA. - **SDPA CDNA:** bf16/f16 at head_dim 64/128/256 with bucket objects between (gfx90a also 96/160/192/224); MLA 192/128 and absorbed-MLA decode (576/512); bias and sinks; BSHD, BHSD and packed QKV strides. Each class ships a default tile plus measured companion tiles. - **Same answer on every family.** RDNA, CDNA and aiw give the same result at the edge cases (keyless rows, −inf and lowest-finite bias rows, NaN rows, sinks, decode splits), matching PyTorch and hipDNN's reference (`COVERAGE.md` §5.7). - **`left_bound`** follows hipDNN's cuDNN meaning (#14483): `L` keeps the L keys ending at the diagonal; the kernels receive `L - 1`, and 0 declines. ## Build flag and CI - `HIPKERNELPROVIDER_ENABLE_FLYDSL` is **OFF by default**, like rocKE, and takes effect only with `HIPDNN_ENABLE_KERNEL_INGESTOR=ON`. A default rocm-libraries build is unchanged and needs no `dvc pull`. TheRock turns FlyDSL on through its `HIPKERNELPROVIDER_ENABLE_FLYDSL` flag (default ON, ROCm/TheRock#9615) together with the ingestor (TheRock #9375), and can turn it off there; the hipDNN superbuild CI passes `-DHIPKERNELPROVIDER_ENABLE_FLYDSL=ON`. - FlyDSL engines and tests compile whenever FlyDSL content exists, independent of `GPU_TARGETS` (TheRock's multi-arch build ships one shard's host half to every arch); device tests decide at run time whether the device's shard is staged. Packing, the shard check and the census follow the requested archs. - `THIRD_PARTY_LICENSES.md` (FlyDSL Apache-2.0, AITER and AOTriton MIT) installs under `share/doc/hip-kernel-provider/flydsl/`; TheRock packages it through the `doc` component added by ROCm/TheRock#9476. - This PR's TheRock Multi-Arch CI builds FlyDSL, runs its device tests and runs the FlyDSL integration entries on Linux gfx94X and Windows gfx110X once its TheRock pin includes ROCm/TheRock#9615. ## Changes outside `flydsl/` - Provider `CMakeLists.txt`: the option, `add_subdirectory(flydsl)` under the ingestor gate, and the DVC check extended to FlyDSL. - `HkpPackaging.cmake`: `FlyDSL` in `HKP_DESCRIPTOR_FAMILIES`. - Ingestor: one pack-table entry and module cache per engine; natives under `kernel_ingestor_engine/packs/Flydsl*`, with shared headers for RMSNorm, RDNA SDPA, CDNA SDPA and both SDPA families. - `descriptors/FlyDSL/`: op-level descriptors, `.dvc` sidecars and per-target `SOURCE.md`. - Tests: `main.cpp` adds the product shard as an additive descriptor root when FlyDSL is active; one engine suite and one census suite per engine, plus a per-object SDPA suite; `TestContainer`'s engine bound raised from 8 to 32. - Integration suite: one external integration entry per FlyDSL engine and architecture (55), pinned with `--test-engine`, checked by the GPU reference executor against the shared RMSNorm, RMSNormBackward and SdpaFwd bundles, routed into the architecture's census shard and gated on FlyDSL content. Each entry's generated TOML skips every other FlyDSL architecture, so a family package (gfx1100–gfx1103) runs each suite once. Category YAMLs `hipkernel_flydsl_*_test_categories_integration.yaml`; the two 4096-token fp16 causal bhsd SdpaFwd cases run from the comprehensive tier up. Support claims recorded for gfx1151. - rocKE test fixes for two Windows CI failures: the GPU-reference worker's temporary directory removal retries while Windows releases a killed worker's handles, and `test_lowers_and_compiles_without_scratch` gets its own 180 s limit (it ran ~54 s of 60 s). `flydsl/` holds the vendored kernel sources at pinned commits (FlyDSL, AITER, AOTriton; every local modification listed in each file's header and in the attention READMEs), the generators, `gen_descriptors.py`, `tools/check_shards.py`, the drift-guard tests, and `README.md`, `REGEN.md` and `COVERAGE.md`. ## Risks | Risk | Mitigation | |---|---| | TheRock ships FlyDSL on merge | TheRock's `HIPKERNELPROVIDER_ENABLE_FLYDSL` flag switches it off; this PR's TheRock CI built and tested FlyDSL, and a run pinned to TheRock main passed on gfx942, gfx950 and gfx110X | | Prebuilt objects drift from their sources | Per-object SHA256 and per-op source digest checked before every pack; drift-guard tests prove the checks refuse tampered trees | | An engine runs a graph it cannot compute | Every read field is gated, with one decline test per rule, mutation-checked | | One object set per generic family | Objects verified as `gfx11-generic` / `gfx12-generic`; every member shard verified after pack; gfx1150 and gfx1153 have no device run (same objects as gfx1151 and gfx1100) | | A device suite passes with no objects staged | Device cases fail rather than skip on an arch that ships their family; shard censuses fail on an empty shard | | Selection between overlapping engines | Static per-object priority today; autotune measures every applicable engine and object; UHD heuristics are a follow-up | **Known deviation:** RMSNorm backward and the two split-KV decode engines launch a second kernel compiled into the same object, named in KMD metadata (`reduce_symbol`, `merge_symbol`), instead of RFC 0017 §15.1 `sources` entries. RFC 0021 §3 names this form as an accepted alternative (`COVERAGE.md` §8). ## Testing - **Strategy:** host tests for every matcher, score and decline rule, checked against compiled mutants; GPU launches against a double-precision host reference; a per-object suite that launches every shipped object (every shape class in its `Full/` tier); shard censuses; `gen_descriptors --check` before pack and `check_shards` after. - **CI:** all required checks green at `fcb674c8766`, with FlyDSL device tests on Linux gfx94X and Windows gfx110X (FlyDSL ON by default then). - **Device runs on the shipped objects:** gfx950, gfx942, gfx90a, gfx1201, gfx1200 and gfx1100 ran the default and `Full/` tiers, launching every object of their families, with 0 failures; gfx1151 runs the default tier. With an empty descriptor root every device case of the arch's families fails. - **Local, this head (gfx1151):** 841 FlyDSL, container and ingestor gtests passed (62 skipped need other GPUs); census, FlyDSL and name-validation CTests pass; the FlyDSL integration entries pass the quick tier (rmsnorm 12, rmsnorm_bwd 5, sdpa_rdna 14, sdpa_rdna_decode 13 cases verified, 0 failed). - **After the next TheRock pin move:** a Multi-Arch run of this head with the TheRock pin moved to TheRock main plus #9615 and ROCm/TheRock#9619 (test branch, not merged) built FlyDSL and passed every hipkernelprovider, hipDNN and integration job on gfx950, gfx942 and Windows gfx110X. The FlyDSL integration entries verified 9–12 cases per SDPA engine and 12/5 per RMSNorm engine, 0 failed; only the runner's own architecture's entries ran. - **Regeneration:** every op on every target is byte-identical to the shipped objects; `diff_upstream.py` shows only recorded modifications. - **Tiers:** quick, standard and comprehensive run everything but `Full/`; the full tier adds every object on every shape class. ## Follow-ups - Support claims for the architectures beyond gfx1151 (harvest from CI once the TheRock pin includes #9615), and UHD heuristics for the FlyDSL engines. - Move the two-launch objects to `hsaco` multi-launch `sources` entries now that #14215 has landed. - RMSNorm: bias/dbias, strided rows, fusions (residual add, FP8 output, zero-centered gamma), baked widths ≤ 2048, backward above 16384. - SDPA: padding/varlen, exact head-dim 96/160/192/224 objects on gfx942/gfx950, a d512 prefill object, the deferred performance items in `COVERAGE.md` §7.5, and upstreaming the kernel modifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA ID: ALMIOPEN-2953, ALMIOPEN-2954, ALMIOPEN-2955
Supersedes #13713 and #13714 (folded in here), the WIP draft #13157, and #13888.
Summary
Adds FlyDSL kernels to the hip-kernel-provider as a second kernel source for the kernel ingestor, beside rocKE: the pipeline that ships prebuilt FlyDSL code objects, and nine engines on top of it.
hipkernel:flydsl_rmsnorm(forward, inference and training),hipkernel:flydsl_rmsnorm_bwd(dx, dgamma)hipkernel:flydsl_sdpa_rdna,hipkernel:flydsl_sdpa_rdna_decode,hipkernel:flydsl_sdpa_aiw(gfx12 only)hipkernel:flydsl_sdpa_cdna,hipkernel:flydsl_sdpa_cdna_decode,hipkernel:flydsl_sdpa_cdna_dualwave(gfx950 only)This was a stack of three PRs (#13712 → #13713 → #13714). It is now one PR, reviewed as one change; the three commits keep their own messages.
How it works
FlyDSL kernels are compiled ahead of time into code objects (
.hsaco), with descriptors generated from them, as aFlyDSL/bundle of the provider's production descriptor root. The provider's shared packer packs them into each architecture's kpack shard, as it does for every other bundle. Neither the build nor the runtime needs FlyDSL or a kernel compiler, and the runtime needs no Python: by the time hipDNN sees them, they are ordinary code objects in an archive. The build runs Python 3 (already required by the provider's packer) forgen_descriptors.py --checkandtools/check_shards.py. Each engine registers four native symbols (graph match, kernel match, score, dispatch) through the existing ingestor pack table.The objects are stored with DVC, not in git. Each
FlyDSL/<op>/<target>/directory (the objects, theirmanifest.jsonand the target's KDP: 1,453 objects, ~29 MB in all) is a DVC output on theingestorremote (s3://therock-dvc/rocm-libraries/hipdnn/ingestor, anonymous reads), the one develop's rocKE descriptors use (#13153). Git holds one<op>/<target>.dvcsidecar per directory (22), which records the directory's content hash, plus the human-facing files: each target'sSOURCE.md, the op-level descriptors (KMD/UDD/UED/UHD/UMD), the generators and the docs.dvc pull -r ingestor dnn-providers/hip-kernel-provider/src/engines/kernel_ingestor_engine/descriptors/FlyDSL/*/*.dvc(TheRock'sfetch_sourcespulls every pointer).dvc pullcommand, and that target ships no FlyDSL kernels; builds and tests still run.-DHIPKERNELPROVIDER_REQUIRE_DVC_DESCRIPTORS=ON, which the superbuild CI and release builds set, makes it an error.manifest.jsonstill records every object's SHA256, whichgen_descriptors.py --checkverifies before every pack, and the sidecar's hash pins the directory as a whole.Objects per target:
RMSNorm
153 objects per target (90 forward, 63 backward).
Nat runtime. The baked widths were chosen by measurement: each candidate was timed against the generic tier (profiler kernel time, M = 4096/16384) on gfx90a, gfx942, gfx950, gfx1201 and gfx1100, and kept where it gained at least 15% on two archs. Forward bakes 2560–16384 (ten widths, 1.2–4.2× over generic on all five).eps=None, fixed in the graph or supplied at execute. The engine declares graph schema 1.2.0 so runtime pass-by-value epsilons reach it.x {B*S, D, 1, 1}/scale {1, D, 1, 1}layout and multi-axis normalized shapes are served. Strides on size-1 axes are ignored, so hipdnn_torch's stride-0 weight is served. Other strided layouts are declined.Backward (dx and dgamma) comes from upstream FlyDSL's deterministic two-stage kernel, vendored with two recorded modifications (a bounded runtime-N variant; a runtime program count). A partial kernel writes dx and one f32 dgamma row per program into a workspace; a reduce kernel in the same object sums them into dgamma, so dgamma is bitwise reproducible. Same dtypes and gamma forms as the forward; baked widths 1536–16384 (twelve, 1.2–8.4× over generic on all five archs) and generic tiers bounded at 1024/8192/16384 (the partial kernel keeps dgamma columns in registers; no shipped object spills VGPRs or uses scratch, though the CDNA
n_max16384 partial kernels spill a few SGPRs; wider graphs decline). dbias declines. An atomic dgamma variant was measured and not shipped: 2.6–90× slower at large M, and its small-M edge sat inside launch overhead.SDPA forward, RDNA
Built for the LLVM generic targets gfx11-generic (RDNA3/3.5) and gfx12-generic (RDNA4); each ships to every member arch.
hipkernel:flydsl_sdpa_rdnahipkernel:flydsl_sdpa_rdna_decodehipkernel:flydsl_sdpa_aiwattention_rdna4/COVERAGE.md§5 lists every rule and the remaining gaps (e.g. padding/varlen).SDPA forward, CDNA
Built per arch from FlyDSL's own MFMA kernels.
hipkernel:flydsl_sdpa_cdna(generic MFMA forward)hipkernel:flydsl_sdpa_cdna_dualwave(dual-wave MFMA forward)hipkernel:flydsl_sdpa_cdna_decode(split-KV decode + merge)COVERAGE.md§7.6).None of the SDPA engines needs
HIPDNN_ENABLE_SDPAto build; that flag only exposes SDPA in the frontend.Feature flag
HIPKERNELPROVIDER_ENABLE_FLYDSLis ON by default, like the ASM SDPA (ENABLE_ASM_SDPA_ENGINE) and ML-ops (ENABLE_HIP_MLOPS_ENGINE) engines, and switched off the same way (-DHIPKERNELPROVIDER_ENABLE_FLYDSL=OFF).HIPDNN_ENABLE_KERNEL_INGESTOR=ON, since only the ingestor loads FlyDSL's shard. The ingestor is OFF by default in develop (and in TheRock), so a default build is unchanged: configure reportsflydsl: not built, builds nothing FlyDSL and needs nodvc pull.HIPDNN_ENABLE_SDPA, which only gates the frontend'sgraph->sdpa(): the full stack builds and passes with it OFF.HIPKERNELPROVIDER_FLYDSL_ACTIVE(internal) is raised only when the product pack ships FlyDSL objects for a requested architecture. The engine sources, tests and census key on it, so building for an architecture with no FlyDSL objects reports "dormant" and compiles nothing FlyDSL.gen_descriptors --check, pack,check_shards.py, census, host tests, and the packaging probes, which include FlyDSL's non-target arches. That lane's runner has no GPU, so no CI lane launches a FlyDSL kernel; device validation is manual (below) until the ingestor flag flips (ALMIOPEN-2835). The Linux gfx942 lane packs the descriptor-packaging fixture tree, so FlyDSL is dormant there by design and it needs no pull. TheRock's Linux CI already pulls the whole repository's DVC content.What changes outside
flydsl/CMakeLists.txt: the option, andadd_subdirectory(flydsl)under the ingestor gate.HkpPackaging.cmake:FlyDSLadded toHKP_DESCRIPTOR_FAMILIES; the packer excludes the folder when the option is OFF.HIPDNN_ENGINE_FLYDSL.kernel_ingestor_engine/packs/:FlydslRmsNorm{,Bwd}Native.cppwithFlydslRmsNormCommon.hpp;FlydslSdpa{Rdna,RdnaDecode,Aiw}Native.cppwithFlydslSdpaRdnaCommon.hpp;FlydslSdpaCdna{,Dualwave,Decode}Native.cppwithFlydslSdpaCdnaCommon.hpp.KernelCompileOptions: an arch-only constructor for packs with no input tensor to derive dtype or layout from.descriptors/FlyDSL/: the op-level descriptors, each target'sSOURCE.md, the 22.dvcsidecars (remote: ingestor) and one.gitignoreper op listing its DVC-managed directories.CMakeLists.txt) loops over rocKE and FlyDSL instead of rocKE alone;HIPKERNELPROVIDER_REQUIRE_DVC_DESCRIPTORScovers both.main.cppadds the product shard as an additive descriptor root (only when FlyDSL is active);IngestorPackTestSupportgainsfindLoadedSet(); one engine suite and one census suite per engine.TestContainer:MAX_EXPECTED_ENGINESraised from 8 to 32 (a buffer bound: FlyDSL adds one engine per kernel family), and its SDPA-graph test expects the FlyDSL CDNA engines beside the ASM engine on gfx90a/942/950.Inside
flydsl/kernels_src/: vendored kernel sources at pinned commits. FlyDSL at 89ad52fbbb9e (recorded ingenerators/_flydsl_env.py, eachSOURCE.mdandTHIRD_PARTY_LICENSES.md); AITER (RDNA attention) and AOTriton (attention_rdna4/). Every file keeps its upstream SPDX and copyright lines. Modified files carry a header recording upstream, commit, path and every local modification:rmsnorm_kernel.py(4),rmsnorm_bwd_kernel.py(2); the attention modifications are listed in each file's header,attention_rdna4/README.mdandattention_cdna/README.md(1–27).THIRD_PARTY_LICENSES.md: FlyDSL's notice and the Apache-2.0 text, and an AOTriton (MIT) section, installed undershare/doc/hip-kernel-provider/flydsl/.generators/: the instance table (_instances.py, one row per shipped object), the per-op generators and the shared machinery.gen_descriptors.py: derives every descriptor from the objects and their manifest: one KDP per op × target, holding one inlinehsacoUKD per object.--checkruns before every pack and fails on any SHA256, target or input-digest mismatch. It reads the generic-target table CMake passes (HIPDNN_PLUGIN_SDK_GPU_GENERIC_TARGETS_JSON), so provider-only checkouts work.tools/check_shards.py: runs after the pack and confirms every member arch's shard ships exactly the shipped objects.tools/diff_upstream.py: a review aid that diffs the vendored sources against FlyDSL, AITER and AOTriton (optional--aotriton). Nothing in the build runs it.README.md(what ships, how it reaches hipDNN, fetching the objects),REGEN.md(byte-reproducible regeneration, verification, and thedvc add/dvc pushstep),COVERAGE.md(every accept and decline rule, with its reason, and measured performance).Risk and mitigation
-DHIPKERNELPROVIDER_ENABLE_FLYDSL=OFF; with it OFF nothing FlyDSL compiles and theFlyDSL/folder is not packed.dvc pullcommand and that target ships no FlyDSL kernels; withREQUIRE_DVC_DESCRIPTORS=ON(CI, release) it fails. Both verified by configuring against a tree with one directory removed.gen_descriptors.py --checkruns before every pack, so a source edit without regeneration fails the build. The CTesthip-kernel-provider-flydsl-drift-guardsproves the checks refuse tampered trees.flydsl==0.3.4, ROCm 7.13).REGEN.md§2 gives the procedure.COVERAGE.mdwith a decline test.gfx11-generic/gfx12-generic(ELF machine andamdhsa.target, checked bygen_descriptors --check). The packer copies the same bytes into each member's shard;check_shards.pyverifies every shard.THIRD_PARTY_LICENSES.mdcarries the notices and license texts and is installed with the provider.Testing
Strategy.
gen_descriptors --checkbefore the pack andcheck_shardsafter it.This head (one commit on develop 3440eec, objects in DVC; ROCm 7.13 SDK, clang-tidy on, gfx1151 host):
GPU_TARGETS=gfx1151;gfx1200;gfx1201;gfx90a;gfx942;gfx950), objects pulled*Flydsl*gtests 569 passed on gfx1151 (the 48 skipped are the gfx12 aiw and CDNA SDPA device cases)REQUIRE_DVC_DESCRIPTORS=ON, everything pulled<op>/<target>/directory missingdvc pull -r ingestor <pointer>command, other targets still ship;REQUIRE_DVC_DESCRIPTORS=ON: configure errordvc push -r ingestor, an anonymous pull into a fresh repository with an empty cache and no credentials returned all 22 directories (1,497 files) byte-identicalThe move to DVC changed no object byte: every directory's content is the same as at the previous head, and the manifests' SHA256s still verify.
RMSNorm (at c0443e8 and the later test revision):
TestGfx950AttentionDense*path-error-message tests (develop code, environment-sensitive, unrelated)F.rms_normand autogradCOVERAGE.md§1 and §2aSDPA RDNA:
diff_upstream.py(FlyDSL, AITER, AOTriton at their pins)dnn-benchmarkingsweeps on gfx1151, gfx1100 and gfx1201 against the PyTorch referenceSDPA CDNA:
Gfx950AttentionDensefailures)Whole stack:
hip_kernel_provider_tests(full)gen_descriptors.py --checkHIPKERNELPROVIDER_ENABLE_PACKAGING_PROBES=ON,GPU_TARGETS=gfx942(as the Linux superbuild CI)ENABLE_FLYDSL=OFFflydsl: not built/ FlyDSL active / off, no FlyDSL build rulesHIPDNN_ENABLE_SDPA=OFFTest tiers. Every tier, pre-merge included, runs all cases but the
Full/ones, among them the drift guards andTestGpuFlydslRmsNormObjects/OnePerForm; the nightly full tier addsFull/...Every(every RMSNorm object per target) andFull/TestGpuFlydslRmsNormTiers. GTest names prefixedFull/are excluded from the quick, standard and comprehensive tiers byHIP_MLOPS_ENGINE_test_categories.yaml.ASIC Coverage
Run on gfx1151, gfx1201, gfx90a, gfx942 and gfx950 (above). gfx1200 and gfx1100–1103/1150/1152/1153 were not run as unit suites; they load the same generic objects (gfx12-generic and gfx11-generic), and gfx1100 ran in the RDNA SDPA dnn-benchmarking sweep.
Known caveat
hipDNN's CPU reference and the dnn-benchmarking PyTorch reference drop the sliding window when a graph sets the deprecated causal-mask boolean together with bounds. FlyDSL keeps it, as cuDNN does. Graphs with that combination (e.g. DeepSeek-V4's 128-key window) can show as mismatches against those references. Tracked in #13065.
Not in this PR / follow-ups
THIRD_PARTY_LICENSES.mdwould not be packaged by TheRock until one is added. That is a prerequisite of flipping the ingestor flag (ALMIOPEN-2835).🤖 Generated with Claude Code