Skip to content

refactor: retire mlx/ — steel attention → sdpa, drop stale steel/conv dupes - #28

Merged
TheTom merged 1 commit into
devfrom
ek/kernel-reorg-steel
Jun 22, 2026
Merged

refactor: retire mlx/ — steel attention → sdpa, drop stale steel/conv dupes#28
TheTom merged 1 commit into
devfrom
ek/kernel-reorg-steel

Conversation

@ekryski

@ekryski ekryski commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The last legacy folder. Retires mlx/ entirely — lib.rs is now just kernels/ + probe/ + utils/.

What moved

  • kernels/sdpa/steel_attn/ (new) — the 4 Steel attention templates (steel_attention{,_mma,_mma_bf16,_nax} = mt_sdpa_prefill{,_mma,_mma_bf16,_nax}), already mt_-prefixed. Intra-refs + the 2 consumer tests repointed mlx::steel::attnkernels::sdpa::steel_attn.

What was dropped

  • mlx/steel/conv/ (steel_conv / _3d / _general) were byte-identical stale duplicates of the already-migrated kernels/convolution/steel_conv/ (doc-only "NOT YET IMPLEMENTED" placeholders — the implicit-GEMM conv needs simdgroup-matmul + im2col DSL primitives that don't exist yet). Deleted.
  • The now-empty mlx/ module + its mod.rs/steel/mod.rs.

Verification

clippy --all-targets -D warnings clean; full tile test = 1394 suites / 4125 tests / 0 failed; steel_attn external suites (sdpa_prefill_mma_long_t, _bf16_gpu) pass.

With this, mlx/ and ffai/ are both fully retired — the entire kernel corpus lives under kernels/<family>/. Stacked on #27.

@github-actions github-actions Bot added the ignore-for-release Hidden from release notes label Jun 14, 2026
@ekryski
ekryski force-pushed the ek/kernel-reorg-sdpa-quant branch from b3f6f2c to c521ca7 Compare June 14, 2026 05:02
@ekryski
ekryski force-pushed the ek/kernel-reorg-steel branch from aa6c037 to ff5e83d Compare June 14, 2026 05:03
@ekryski
ekryski force-pushed the ek/kernel-reorg-sdpa-quant branch from c521ca7 to 0be5a16 Compare June 14, 2026 05:08
@ekryski
ekryski force-pushed the ek/kernel-reorg-steel branch from ff5e83d to 722bfa8 Compare June 14, 2026 05:08
@TheTom

TheTom commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@ekryski clean, steel→sdpa is a pure relocation (99-100% rename similarity, kernels unchanged), dropped steel/conv are dead dupes, registry-consistency test retargeted to src/kernels. Title nit: "steel attention → sdpa" reads behavioral; it's a folder move, one body line that the templates are preserved verbatim would help.

Cross-cutting CI follow-up (caused by this PR + #27 removing the dirs, not a defect in the move itself): the bench-regression gate goes no-op post-merge, tile.yml shards bench-ffai/bench-mlx gate on src/ffai/**+src/mlx/** paths and --match-group 'ffai'|'mlx', and kernel_family() (harness.rs ~L1364) derives family from the first dir under /src/, which is now always "kernels", so --match-group by family matches nothing and its unit test (~L1463) still asserts mlx/ffai. tile build/tile test aren't family-gated so correctness CI is fine; it's only perf-regression coverage that goes dark. Suggest: have kernel_family() skip a leading kernels/ segment + return the family below it (the path-side counterpart to the op_group fix in #20), and redefine the bench shards/path-filters around kernels/<family>/. Also codecov.yml:78-79 + coverage.yml:59 still ignore src/{ffai,mlx}/**, realign to src/kernels/**. Approve the move; these are a fast-follow.

…rop dead steel/conv dupes

Completes the kernel reorg: moves the steel attention templates from
src/mlx/steel/attn/ to kernels/sdpa/steel_attn/ (verbatim), deletes the
dead src/mlx/steel/conv duplicates and the now-empty mlx module, drops
pub mod mlx from lib.rs, and repoints the kernel-registry + sdpa prefill
tests at kernels/. cargo check -p metaltile-std green.
@TheTom
TheTom force-pushed the ek/kernel-reorg-steel branch from ffad7fc to 6a2035a Compare June 22, 2026 21:36
@TheTom
TheTom changed the base branch from ek/kernel-reorg-sdpa-quant to dev June 22, 2026 21:36
@TheTom
TheTom merged commit d0a181f into dev Jun 22, 2026
5 of 21 checks passed
TheTom added a commit that referenced this pull request Jun 22, 2026
Carves the HIP/Vulkan device-backend changes + codegen/hip + hip/vulkan
corpus tests out of #13, rebased onto the kernels/ reorg (#28). Runtime +
codegen/hip are untouched by the reorg so they apply clean. vulkan_coopmat_gemm
and vulkan_sdpa_multi had no net logic in #13 beyond renames the reorg already
made, so they stay at the #28 version. HIP/Vulkan build validated in CI (no
nvcc/vulkan on the dev mac).

Follow-up to the kernel reorg.
@ekryski
ekryski deleted the ek/kernel-reorg-steel branch July 13, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants