TileOPs-Metax/tileops/ops
ray24777 e18a3a1a71 feat(quant_swiglu): add fused SwiGLU + per-channel FP8 cast op
Implement QuantSwiGLUFwdChannelCastTransposeOp and flip its manifest status
to implemented: fused SwiGLU forward (silu(gate)*value) + per-token-block
FP8 e4m3 cast with optional transpose, returning a packed FP8 output plus an
fp32 per-block scaling-factor tensor.

Faithful port of swiglu_forward_and_per_channel_cast_and_transpose from
MetaX-MACA/TileKernels-Metax @ 0266ab7 (tile_kernels/quant/). The kernel
tiles tokens x hidden, stages the activation in shared memory, reduces the
per-block absmax (packed-bf16 in the non-transpose path, fp32 fragment in
the transpose path), and emits the quantized output.

- kernel: tileops/kernels/quant_swiglu_channel_cast_transpose.py
- op: tileops/ops/quant_swiglu_channel_cast_transpose.py
- workload, correctness tests, manifest-driven baseline benchmark
- manifest: status spec-only -> implemented, source.kernel_map added

Baseline (MetaX C500, 50% compute slice): 4.7-9.4x faster than the torch
reference; 0.24-0.36 TB/s achieved on roofline bytes (kernel is not yet
bandwidth-saturated). See logs/2026-08-03_baseline_notes.md.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-03 15:28:30 +00:00
..
attention docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
elementwise docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
moe docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
norm [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
reduction docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
__init__.py feat(quant_swiglu): add fused SwiGLU + per-channel FP8 cast op 2026-08-03 15:28:30 +00:00
_dtype_codegen.py docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
_roofline_codegen.py [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
bmm.py [Feat][BMM] Add FP8 BMM op (#1709) 2026-07-16 10:09:14 +08:00
cb_producer.py [Perf][Mamba] Optimize Mamba2 forward: eliminate cast overhead in CB and dt tensors (#1675) 2026-07-14 11:48:53 +08:00
compile_boundary.py [Feat][OPS] compile dispatch boundary; pool declarations; design-doc audit (#1757) 2026-07-26 10:36:34 +08:00
convolution.py [Feat][CONV_POOL] Infer conv pool shape metadata from inputs (#1677) 2026-07-11 21:23:10 +08:00
da_cumsum.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
deltanet.py docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
deltanet_recurrence.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
dropout.py [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
engram.py [Fix][Ops] Complete GqaSlidingWindow rename and enable RUF022 (#967) 2026-04-14 21:45:16 +08:00
engram_decode.py [Refactor] Rename base modules to <module>_base.py convention (#950) 2026-04-13 18:13:32 +08:00
fft.py [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
fp8_lightning_indexer.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
fp8_quant.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
gated_deltanet.py docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
gated_linear_attn.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
gemm.py docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
gla.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
grouped_gemm.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
mamba2_fwd.py [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
mhc.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
op_base.py [Feat][OPS] compile dispatch boundary; pool declarations; design-doc audit (#1757) 2026-07-26 10:36:34 +08:00
pool.py docs: add MetaX C500 summer-camp guide on top of upstream dev 2026-07-28 17:55:09 +00:00
quant_swiglu_channel_cast_transpose.py feat(quant_swiglu): add fused SwiGLU + per-channel FP8 cast op 2026-08-03 15:28:30 +00:00
rope.py [Chore][Cleanup] repo slimming: dead code, duplicated tests/benches, compat shims, file defragmentation (#1764) 2026-07-26 12:59:48 +08:00
ssd_chunk_scan.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
ssd_chunk_state.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
ssd_decode.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
ssd_state_passing.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00
topk_selector.py [Refactor][Ops] Infer static metadata from forward inputs (#1734) 2026-07-25 12:05:17 +08:00