TileOPs-Metax/tileops/ops
Cao Ying 6a61ba14d9
[Refactor] Align kernels/tests/benchmarks structure with ops layout (#928)
## Summary

Align `kernels/`, `tests/`, and `benchmarks/` file structure 1:1 with
the post-#890 `ops/` layout. Eliminates unnecessary directory nesting
and consolidates trivially small files.

**Changes (166 files, 11 commits):**
1. Consolidate attention kernel directories into `kernels/attention/`
2. Rename `kernels/conv/` to `kernels/convolution/`
3. Drop `_fwd` suffix from mamba kernel filenames
4. Flatten `kernels/norm/` subdirectories
5. Flatten `kernels/reduction/` subdirectories
6. Flatten single-file kernel directories
7. Consolidate tests and benchmarks to mirror kernel layout
8. Delete stale `CHANGELOG.md`

Closes #924

## Test plan

- [x] **AC-1**: All `__init__.py`, `ops_manifest.yaml`, and internal
imports updated for moved files -- Manifest path audit: checked 208
paths, 0 missing. Runtime validation passed.
- [x] **AC-2**: `from tileops.kernels import ...` resolves for all moved
kernels -- 73 symbols exported and resolved with 0 failures.
- [x] **AC-3**: Full test suite passes -- `pytest tests` -> 2361 passed,
22 skipped, 0 failed (236.78s).
- [x] **AC-4**: No orphaned directories remain after migration -- `find`
produced no empty directories.

## Follow-up

- #929 — Update stale kernel path reference in docs/manifest.md (doc
drift from this refactor)

---------

Co-authored-by: Ibuki 🍃 — a wind born from Claude Opus <Ibuki-wind@users.noreply.github.com>
2026-04-12 23:24:03 +08:00
..
attention [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
moe [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
norm [Refactor][Naming] Rename Op/Kernel classes to match manifest keys (#873) 2026-04-09 19:57:59 +08:00
reduction [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
__init__.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
convolution.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
da_cumsum.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
deltanet.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
deltanet_recurrence.py [Feat] Add DeltaNet (ungated) chunkwise and recurrence ops (#633) 2026-03-24 15:12:40 +08:00
dropout.py [Feat][Elementwise] Add DropoutKernel + DropoutOp with Philox PRNG (#491) 2026-03-16 11:27:48 +08:00
elementwise.py [Fix][Elementwise] Add missing input and scalar validation to independent ops (#610) 2026-03-23 16:20:39 +08:00
engram.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
engram_decode.py [Feat][Engram] Add Engram module operators: GateConv fwd/bwd + fused decode (#414) 2026-03-10 12:06:23 +08:00
fft.py [Feat][FFT] Add native batch support to FFTC2COp (#708) 2026-03-30 20:26:12 +08:00
fp8_lighting_indexer.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
fp8_quant.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gated_deltanet.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gated_deltanet_recurrence.py [Refactor][LinearAttn] Rename files to match DEVELOPMENT.md convention (#592) 2026-03-19 15:25:46 +08:00
gemm.py [Refactor][Kernels] Consolidate kernel packages and add unified re-exports (#427) 2026-03-10 20:10:14 +08:00
gla.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gla_recurrence.py [Refactor][LinearAttn] Rename files to match DEVELOPMENT.md convention (#592) 2026-03-19 15:25:46 +08:00
grouped_gemm.py [Refactor][Naming] Rename Op/Kernel classes to match manifest keys (#873) 2026-04-09 19:57:59 +08:00
op.py [Refactor][Naming] Rename 12 Op classes to match manifest keys (#883) 2026-04-10 18:22:00 +08:00
pool.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
rope.py [Feat][Elementwise] Implement 5 RoPE variants with 1D and 2D layouts (#492) 2026-03-16 13:00:45 +08:00
ssd_chunk_scan.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
ssd_chunk_state.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
ssd_decode.py [Feat] Add ssd_decode and da_cumsum_fwd kernels for Mamba-2 (#665) 2026-04-01 19:28:14 +08:00
ssd_state_passing.py [Refactor] Reduce ops/ file count: merge avg_pool, drop _fwd/_bwd suffixes, add attention/ subpackage (#890) 2026-04-10 20:02:46 +08:00
topk_selector.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00