Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/metaltile-std/src/kernels/sdpa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ pub mod sdpa_multi_d256;
pub mod sdpa_prefill_d512_sink;
pub mod sdpa_rel_pos_conformer;
pub mod sdpa_vector;
pub mod steel_attn;
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub mod kernel_benches {

use super::mt_sdpa_prefill;
use crate::{
mlx::steel::attn::{
kernels::sdpa::steel_attn::{
steel_attention_mma::mt_sdpa_prefill_mma,
steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16,
},
Expand Down Expand Up @@ -533,7 +533,7 @@ pub mod kernel_tests {

use super::mt_sdpa_prefill;
use crate::{
mlx::steel::attn::{
kernels::sdpa::steel_attn::{
steel_attention_mma::mt_sdpa_prefill_mma,
steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ pub mod kernel_tests {

use super::mt_sdpa_prefill_mma;
use crate::{
mlx::steel::attn::steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16,
kernels::sdpa::steel_attn::steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16,
utils::{pack_f32, unpack_f32},
};

Expand Down
27 changes: 0 additions & 27 deletions crates/metaltile-std/src/mlx/mod.rs

This file was deleted.

5 changes: 0 additions & 5 deletions crates/metaltile-std/src/mlx/steel/conv/mod.rs

This file was deleted.

18 changes: 0 additions & 18 deletions crates/metaltile-std/src/mlx/steel/conv/steel_conv.rs

This file was deleted.

14 changes: 0 additions & 14 deletions crates/metaltile-std/src/mlx/steel/conv/steel_conv_3d.rs

This file was deleted.

13 changes: 0 additions & 13 deletions crates/metaltile-std/src/mlx/steel/conv/steel_conv_general.rs

This file was deleted.

4 changes: 0 additions & 4 deletions crates/metaltile-std/src/mlx/steel/mod.rs

This file was deleted.

12 changes: 6 additions & 6 deletions crates/metaltile-std/tests/kernel_registry_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! c. Defined locally in the same emit (template/inline function).
//!
//! 2. **Empty / unregistered kernel** — every `#[kernel] pub fn name`
//! in `crates/metaltile-std/src/{mlx,ffai}/**` should have a matching
//! in `crates/metaltile-std/src/kernels/**` should have a matching
//! `inventory::submit!` for a BenchSpec that references its
//! `kernel_ir_for` function. PR #19 silently emptied a kernel body
//! via macro refactor; the inverse failure (kernel defined but
Expand All @@ -41,7 +41,7 @@ use std::{
use metaltile::codegen::{MslGenerator, msl::MslConfig};
// Import the registries via `metaltile_std` (not `metaltile_core`) so the std
// rlib — which carries the `#[kernel]` / `#[bench]` / `#[test_kernel]` inventory
// statics in its `ffai` / `mlx` modules — is force-linked into this test binary.
// statics in its `kernels` modules — is force-linked into this test binary.
// Importing them from `metaltile_core` would yield empty registries here.
use metaltile_std::{all_benches, all_kernels};

Expand Down Expand Up @@ -340,9 +340,9 @@ fn kernel_annotations_have_matching_inventory_submit() {
// `CARGO_MANIFEST_DIR` points at `crates/metaltile-std`.
let manifest_dir = env!("CARGO_MANIFEST_DIR");
let src_root = Path::new(manifest_dir).join("src");
// Restrict the walk to mlx + ffai (where actual kernels live) to
// avoid scanning spec.rs / run_spec.rs glue files.
let scan_dirs = ["mlx", "ffai"];
// Restrict the walk to the consolidated `kernels/` tree (where every
// kernel now lives) to avoid scanning spec.rs / run_spec.rs glue files.
let scan_dirs = ["kernels"];

// Track (kernel_name, source_file_path) for the second-pass check
// that looks up `kernel_ir: <name>::kernel_ir_for` in inventory
Expand Down Expand Up @@ -386,7 +386,7 @@ fn kernel_annotations_have_matching_inventory_submit() {

assert!(
!annotated.is_empty(),
"no `#[kernel]` annotations found under `src/{{mlx,ffai}}` — walker broken?"
"no `#[kernel]` annotations found under `src/kernels` — walker broken?"
);

// Now: for each annotated kernel, it should match a registered
Expand Down
2 changes: 1 addition & 1 deletion crates/metaltile-std/tests/sdpa_prefill_mma_bf16_gpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mod common;

use common::{Dt, gpu_lock, pack_bytes, unpack_bytes};
use metaltile::Context;
use metaltile_std::mlx::steel::attn::steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16;
use metaltile_std::kernels::sdpa::steel_attn::steel_attention_mma_bf16::mt_sdpa_prefill_mma_bf16;

/// Causal-prefill SDPA reference for the (B, n_q_heads, q_len, head_dim)
/// + (B, n_kv_heads, k_len, head_dim) layout the kernel reads.
Expand Down
2 changes: 1 addition & 1 deletion crates/metaltile-std/tests/sdpa_prefill_mma_long_t.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod common;

use common::{Dt, gpu_lock, pack_bytes, ramp, unpack_bytes};
use metaltile::Context;
use metaltile_std::mlx::steel::attn::steel_attention_mma::mt_sdpa_prefill_mma;
use metaltile_std::kernels::sdpa::steel_attn::steel_attention_mma::mt_sdpa_prefill_mma;

/// Naive SDPA prefill (single batch, full causal). Q/K/V are
/// `[n_heads_or_kv * T * D]` row-major; output is `[n_heads * T * D]`.
Expand Down
Loading