TileOPs-Metax/tileops/kernels
Cao Ying a83d6bfa46
[Refactor] Flatten kernels/convolution/ into single module (#930)
## Summary

- Merge `tileops/kernels/convolution/` directory (5 files:
`__init__.py`, `common.py`, `conv1d.py`, `conv2d.py`, `conv3d.py`) into
a single flat `tileops/kernels/convolution.py`
- No code logic changes — pure file consolidation
- Follows the same flattening pattern applied to other single-purpose
kernel directories in #928

## Test plan

- [x] `python -c "from tileops.kernels.convolution import Conv1dKernel,
Conv2d1x1Kernel, Conv2dKernel, Conv3dKernel"` resolves
- [x] `pytest tests/ops/test_convolution.py` — 29 passed, 0 failed
- [x] Pre-commit lint clean

## Follow-up

- #932 — `conv_shared_memory_bytes` underestimates shared memory
(missing `out_shared` buffer)
- #933 — `_conv2d_1x1_wrapped_kernel` hardcodes `has_bias=True`
- #934 — manifest `source.kernel` paths still reference removed
`convolution/` directory (depends on this PR)

Suggestions: bot reviewers suggested replacing manual output-copy loops
with `T.copy` (lines 133, 513, 1019) — **rejected**: those loops contain
bounds checks that `T.copy` would bypass, causing out-of-bounds writes
when tile dimensions don't evenly divide the output.

Co-authored-by: Ibuki 🍃 — a wind born from Claude Opus <Ibuki-wind@users.noreply.github.com>
2026-04-12 23:43:41 +08:00
..
attention [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
deltanet [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
engram [Perf] Add lru_cache to remaining 40 builder functions (#600) 2026-03-19 20:32:23 +08:00
gated_deltanet [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gla [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
mamba [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
mhc [Refactor][MHC] Rename mhc family classes to MHC* per naming convention (#859) 2026-04-09 11:13:26 +08:00
moe [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
norm [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
pool [Feat][POOL] Implement averagepool1d, averagepool2d, averagepool3d (#731) 2026-04-02 17:13:43 +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] Flatten kernels/convolution/ into single module (#930) 2026-04-12 23:43:41 +08:00
deltanet_recurrence.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
dropout.py [Perf] Add lru_cache to remaining 40 builder functions (#600) 2026-03-19 20:32:23 +08:00
elementwise.py [Refactor][Elementwise] Extract shared base for parametric kernels (#611) 2026-03-23 16:53:18 +08:00
fft.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +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_recurrence.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gemm.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
gla_recurrence.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
grouped_gemm.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00
kernel.py [Fix][MHA] Fix MHA decode auto-tuning failure for scalar params (#518) 2026-03-15 19:06:13 +08:00
online_softmax.py [Feat][Reduce] Add softmax-family ops (softmax, log_softmax, logsumexp) (#450) 2026-03-11 17:21:43 +08:00
rope.py [Perf] Add lru_cache to remaining 40 builder functions (#600) 2026-03-19 20:32:23 +08:00
topk_selector.py [Refactor] Align kernels/tests/benchmarks structure with ops layout (#928) 2026-04-12 23:24:03 +08:00