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 |