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 docs/audit/generated/apple_target_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ load_balance_loss,tensor,reference,numpy_reference,fp32,,numpy_reference,compile
log_cosh_loss,tensor,reference,numpy_reference,fp32,,numpy_reference,compiled,,fp32,,manifest,tests/unit/test_apple_*.py,
lookahead_sparse_attention,tensor,reference,numpy_reference,fp32,,numpy_reference,fused,,fp32,,manifest,tests/unit/test_apple_*.py,
lora_linear,tensor,reference,numpy_reference,fp32,,numpy_reference,compiled,,fp32,,manifest,tests/unit/test_apple_*.py,
lstm_cell,tensor,reference,numpy_reference,fp32,,numpy_reference,compiled,,fp32,,manifest,tests/unit/test_apple_*.py,
lu,tensor,reference,numpy_reference,fp32,,numpy_reference,compiled,,fp32,,manifest,tests/unit/test_apple_*.py,
mae_loss,tensor,reference,numpy_reference,fp32,,numpy_reference,compiled,,fp32,,manifest,tests/unit/test_apple_*.py,
masked_categorical,tensor,reference,numpy_reference,fp32,,numpy_reference,fused,,"fp32,int32",tessera_apple_gpu_masked_categorical_f32,driver,tests/unit/test_apple_gpu_ldt_loss_ops.py,
Expand Down
5 changes: 3 additions & 2 deletions docs/audit/generated/apple_target_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ and ``docs/apple_backend.md`` (Metal 4 implementation-state review):

| Family | Rows | apple_gpu fused | apple_cpu accelerate_native |
|---|---:|---:|---:|
| tensor | 134 | 21 | 2 |
| tensor | 135 | 21 | 2 |
| ga | 19 | 19 | 0 |
| ebm | 14 | 14 | 0 |
| m7 | 4 | 4 | 0 |

## tensor (134)
## tensor (135)

| Op | apple_cpu status | cpu framework | cpu dtypes | cpu symbol | execution_kind | apple_gpu status | gpu framework | gpu dtypes | gpu symbol | gpu_dispatch | proof |
|---|---|---|---|---|---|---|---|---|---|---|---|
Expand Down Expand Up @@ -125,6 +125,7 @@ and ``docs/apple_backend.md`` (Metal 4 implementation-state review):
| log_cosh_loss | reference | numpy_reference | fp32 | - | numpy_reference | compiled | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| lookahead_sparse_attention | reference | numpy_reference | fp32 | - | numpy_reference | fused | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| lora_linear | reference | numpy_reference | fp32 | - | numpy_reference | compiled | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| lstm_cell | reference | numpy_reference | fp32 | - | numpy_reference | compiled | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| lu | reference | numpy_reference | fp32 | - | numpy_reference | compiled | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| mae_loss | reference | numpy_reference | fp32 | - | numpy_reference | compiled | - | fp32 | - | manifest | tests/unit/test_apple_*.py |
| masked_categorical | reference | numpy_reference | fp32 | - | numpy_reference | fused | - | fp32,int32 | tessera_apple_gpu_masked_categorical_f32 | driver | tests/unit/test_apple_gpu_ldt_loss_ops.py |
Expand Down
8 changes: 4 additions & 4 deletions docs/audit/generated/compiler_progress.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ primitive_axis,lowering_rule,closed,480,480,0,"primitive contract axis; open mea
primitive_axis,backend_kernel,mixed,99,480,381,"primitive contract axis; open means partial or planned, not necessarily missing API support",docs/audit/generated/s_series_status.md,Promote by backend/pathway; do not treat every target as an all-up compiler veto.
integration,Verifier coverage,mixed,163,174,11,"no_verifier=11, real=163",docs/audit/generated/verifier_coverage.csv,"Add real verifier implementations for no_verifier ops, prioritizing native codegen lanes."
integration,Direct test evidence,mixed,363,480,117,"covered_by_family=26, directly_tested=363, hardware_gated=4, structural_only=87",docs/audit/generated/test_coverage.csv,Convert structural_only and needs_direct_test rows into direct compare fixtures; keep hardware_gated tied to backend proof.
integration,Runtime execution matrix,closed,147,147,0,"apple_cpu=2, apple_gpu=16, cpu=2, nvidia_sm120=1, rocm=65, x86=61",docs/audit/generated/runtime_execution_matrix.csv,Add rows only when a launch path actually executes.
integration,Runtime execution matrix,closed,149,149,0,"apple_cpu=2, apple_gpu=16, cpu=2, nvidia_sm120=1, rocm=67, x86=61",docs/audit/generated/runtime_execution_matrix.csv,Add rows only when a launch path actually executes.
integration,Runtime ABI symbols,mixed,397,650,253,"apple=557, nvidia=7, rocm=10, x86=76",docs/audit/generated/runtime_abi.csv,Reduce stub-only ABI rows where a backend claims native execution.
integration,Audited repo surfaces,mixed,31,58,27,"archived=4, compile_only=12, runnable=31, runnable_optional=1, scaffold=10",docs/audit/generated/surface_status.csv,Graduate compile_only/scaffold entries that exercise compiler pathways; archive dead surfaces.
codegen_pathway,Apple CPU,closed,173,173,0,"runtime: apple_cpu=2; target_map: fused=2, reference=169",docs/audit/generated/apple_target_map.csv,Keep as regression baseline for CPU value-call/runtime ABI.
codegen_pathway,Apple GPU,mixed,186,187,1,"runtime: apple_gpu=16; target_map: absent=1, compiled=101, fused=58, hardware_verified=11",docs/audit/generated/apple_target_map.csv,Close the remaining absent target-map lane or document why it is host-only.
codegen_pathway,Apple CPU,closed,174,174,0,"runtime: apple_cpu=2; target_map: fused=2, reference=170",docs/audit/generated/apple_target_map.csv,Keep as regression baseline for CPU value-call/runtime ABI.
codegen_pathway,Apple GPU,mixed,187,188,1,"runtime: apple_gpu=16; target_map: absent=1, compiled=102, fused=58, hardware_verified=11",docs/audit/generated/apple_target_map.csv,Close the remaining absent target-map lane or document why it is host-only.
codegen_pathway,x86 / CPU,closed,2,2,0,runtime: cpu=2,docs/audit/generated/runtime_execution_matrix.csv,Keep native CPU and numpy reference lanes separate in runtime proofs.
codegen_pathway,ROCm / HIP,closed,101,101,0,"runtime: rocm=65; target_map: compiled=34, hardware_verified=2",docs/audit/generated/rocm_target_map.csv,Close the artifact-only target-map tail and preserve CDNA as hardware-gated.
codegen_pathway,ROCm / HIP,closed,103,103,0,"runtime: rocm=67; target_map: compiled=34, hardware_verified=2",docs/audit/generated/rocm_target_map.csv,Close the artifact-only target-map tail and preserve CDNA as hardware-gated.
codegen_pathway,CUDA / NVIDIA,mixed,1,40,39,runtime: nvidia_sm120=1; target_map: artifact_only=39,docs/audit/generated/nvidia_sm90_target_map.csv,"Promote artifact-only rows with execute-and-compare, starting from sm_120 matmul adjacency and attention."
open_work,Target IR native/fused codegen,mixed,309,315,6,"compiled=196, fused=71, hardware_verified=13, not_applicable=29, reference=6",docs/audit/generated/support_table.csv,Promote high-use reference rows into native/fused Target IR or mark intentional reference-only lanes.
open_work,backend_kernel,mixed,99,480,381,"primitive contract axis; open means partial or planned, not necessarily missing API support",docs/audit/generated/s_series_status.md,Promote by backend/pathway; do not treat every target as an all-up compiler veto.
Expand Down
8 changes: 4 additions & 4 deletions docs/audit/generated/compiler_progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ A row is not marked incomplete merely because Apple, x86, ROCm, and CUDA are not
|---|---|---:|---:|---:|---|---|
| `Verifier coverage` | mixed | 163 | 174 | 11 | no_verifier=11, real=163 | Add real verifier implementations for no_verifier ops, prioritizing native codegen lanes. |
| `Direct test evidence` | mixed | 363 | 480 | 117 | covered_by_family=26, directly_tested=363, hardware_gated=4, structural_only=87 | Convert structural_only and needs_direct_test rows into direct compare fixtures; keep hardware_gated tied to backend proof. |
| `Runtime execution matrix` | closed | 147 | 147 | 0 | apple_cpu=2, apple_gpu=16, cpu=2, nvidia_sm120=1, rocm=65, x86=61 | Add rows only when a launch path actually executes. |
| `Runtime execution matrix` | closed | 149 | 149 | 0 | apple_cpu=2, apple_gpu=16, cpu=2, nvidia_sm120=1, rocm=67, x86=61 | Add rows only when a launch path actually executes. |
| `Runtime ABI symbols` | mixed | 397 | 650 | 253 | apple=557, nvidia=7, rocm=10, x86=76 | Reduce stub-only ABI rows where a backend claims native execution. |
| `Audited repo surfaces` | mixed | 31 | 58 | 27 | archived=4, compile_only=12, runnable=31, runnable_optional=1, scaffold=10 | Graduate compile_only/scaffold entries that exercise compiler pathways; archive dead surfaces. |

## Code Generation Pathways

| Item | Status | Ready | Total | Open | Detail | Next |
|---|---|---:|---:|---:|---|---|
| `Apple CPU` | closed | 173 | 173 | 0 | runtime: apple_cpu=2; target_map: fused=2, reference=169 | Keep as regression baseline for CPU value-call/runtime ABI. |
| `Apple GPU` | mixed | 186 | 187 | 1 | runtime: apple_gpu=16; target_map: absent=1, compiled=101, fused=58, hardware_verified=11 | Close the remaining absent target-map lane or document why it is host-only. |
| `Apple CPU` | closed | 174 | 174 | 0 | runtime: apple_cpu=2; target_map: fused=2, reference=170 | Keep as regression baseline for CPU value-call/runtime ABI. |
| `Apple GPU` | mixed | 187 | 188 | 1 | runtime: apple_gpu=16; target_map: absent=1, compiled=102, fused=58, hardware_verified=11 | Close the remaining absent target-map lane or document why it is host-only. |
| `x86 / CPU` | closed | 2 | 2 | 0 | runtime: cpu=2 | Keep native CPU and numpy reference lanes separate in runtime proofs. |
| `ROCm / HIP` | closed | 101 | 101 | 0 | runtime: rocm=65; target_map: compiled=34, hardware_verified=2 | Close the artifact-only target-map tail and preserve CDNA as hardware-gated. |
| `ROCm / HIP` | closed | 103 | 103 | 0 | runtime: rocm=67; target_map: compiled=34, hardware_verified=2 | Close the artifact-only target-map tail and preserve CDNA as hardware-gated. |
| `CUDA / NVIDIA` | mixed | 1 | 40 | 39 | runtime: nvidia_sm120=1; target_map: artifact_only=39 | Promote artifact-only rows with execute-and-compare, starting from sm_120 matmul adjacency and attention. |

## Open Work Summary
Expand Down
2 changes: 1 addition & 1 deletion docs/audit/generated/rocm_target_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ softmax,activation,compiled,"fp32,fp16,bf16",hipcc≥7.2.4,,,,"Row-wise stable s
softmax_safe,activation,compiled,fp32,hipcc≥7.2.4,,,,Stable reduction softmax_safe — max-shifted reduce (max/sum) + unary exp/log lane. Executes via runtime.launch() (rocm_stable_reduce_compiled).
attn_sliding_window,attention,compiled,"fp16,bf16",hipcc≥7.2.4,,,,"Mistral sliding-window via the flash_attn WMMA kernel (sliding_window attr, causal band of width W; KV-tile skip). Executes via runtime.launch() (window kwarg)."
deepseek_sparse_attention,attention,compiled,fp32,hipcc≥7.2.4,,,,"DeepSeek/NSA composition — sliding + compressed-block branches remain reference compositions while the top-k branch uses the GPU-resident top-k selector plus selected-block sparse-attention kernel when ROCm is available. Executes via runtime.launch() (rocm_sparse_attn_compiled), with exact reference fallback off hardware."
flash_attn,attention,hardware_verified,"fp16,bf16",hipcc≥7.2.4,,0.6500,,"RDNA 3.5 WMMA flash-attention forward executes on the AMD GPU through the shipped libtessera_rocm_flash_attn.so symbols (tessera_rocm_wmma_flash_attn_{f16,bf16}, HIPRTC-compiled for the device arch at load); ROCm 7.2.4. The second op after matmul to run natively on a non-Apple backend. Numerically validated vs a numpy attention reference by the execute_compare_fixture."
flash_attn,attention,hardware_verified,"fp16,bf16",hipcc≥7.2.4,,0.6500,,"RDNA 3.5 WMMA flash-attention forward executes on the AMD GPU through the shipped libtessera_rocm_flash_attn.so symbols (tessera_rocm_wmma_flash_attn_{f16,bf16}, HIPRTC-compiled for the device arch at load); ROCm 7.2.4. The second op after matmul to run natively on a non-Apple backend. Numerically validated vs a numpy attention reference by the execute_compare_fixture. The FA-2 BACKWARD (dQ/dK/dV) also executes on gfx1151 via the compiler-generated rocm_flash_attn_bwd_compiled lane (generate-wmma-flash-attn-bwd-kernel -> fa_pre/fa_dkdv/fa_dq; MHA + GQA/MQA + additive attn_bias + sliding-window + logit-softcap, scale+causal), validated vs autodiff vjp_flash_attn — see the runtime_execution_matrix."
gated_attention,attention,compiled,"fp16,bf16",hipcc≥7.2.4,,,,Softmax attention × a learned gate — the WMMA flash_attn kernel + an elementwise sigmoid-gate multiply. Executes via runtime.launch() (rocm_exotic_attn_compiled).
gated_deltanet,attention,compiled,"fp32,fp16,bf16",hipcc≥7.2.4,,,,"Gated/delta linear-attention recurrence as a causal SEQUENTIAL-SCAN kernel (generate-rocm-deltanet-kernel: one workgroup per (b,h), one thread per value-column, LDS state) — the first recurrent compiled ROCm kernel. erase/gate/beta/decay flags. Executes via runtime.launch() (rocm_deltanet_compiled)."
gqa_attention,attention,compiled,"fp16,bf16",hipcc≥7.2.4,,,,"GQA/MQA via the flash_attn WMMA kernel (gqa directive attr; fwd+bwd, grouped K/V; runtime detects from operand shapes). Executes on gfx1151 via runtime.launch() (rocm_flash_attn_compiled); no shipped C-ABI symbol."
Expand Down
Loading
Loading