## Summary
- Fix auto-tuning failure for MHA decode kernels caused by
`real_seqlen_kv: T.int32` scalar parameter that tilelang's autotuner
cannot auto-generate inputs for
- Add `autotune_supply_prog` property to `Kernel` base class for
subclasses with scalar kernel parameters
- Implement custom `supply_prog` in `mha_decode_kernel` that provides
`seqlen_kv` for scalar params
Closes#517
Found in nightly test:
https://github.com/tile-ai/TileOPs/actions/runs/23102471148/job/67105637462
## Test plan
- [x] `pytest
benchmarks/ops/bench_mha_decode.py::test_mha_decode_bench[bf16-long-cache]`
— previously failing, now passes
- [x] `pytest
benchmarks/ops/bench_mha_decode.py::test_mha_decode_bench[fp16-long-cache]`
— previously failing, now passes
- [x] `pytest
benchmarks/ops/bench_mha_decode.py::test_mha_decode_bench[short-kv-tail]`
— passes
- [x] All 3 mha_decode benchmarks pass
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Add a `hasattr` guard in `Kernel.autotune()` to check that
`self.kernel` is set before attempting to use it
- Raises a clear `AttributeError` with an actionable message instead of
a cryptic attribute error when `tune=True` is passed to a kernel that
hasn't set `self.kernel`
- Prevents crashes in all affected NSA kernels (`NSAFwdVarlenKernel`,
`NSATopkVarlenKernel`, `NSACmpFwdVarlenKernel`, `MeanPoolingFwdKernel`,
`GQAWindowSlidingKernel`) and any future kernels that omit `self.kernel`
Closes#197
## Test plan
- [ ] Verify that instantiating an affected NSA kernel with `tune=True`
now raises a clear error message instead of a cryptic `AttributeError`
- [ ] Verify that kernels which do set `self.kernel` (e.g.,
`MHAFwdKernel`) still autotune correctly when `tune=True`
- [ ] Verify that `pre-commit run --all-files` passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary
Closes#186
- Rename `top/` → `tileops/` to align the source directory name with the
package name defined in `pyproject.toml` (`name = "tileops"`)
- Update all internal imports (`from top.` → `from tileops.`) across 116
Python files
- Update documentation paths in `DEVELOPMENT.md`, `README.md`,
`SKILL.md`, and issue templates
- Update `.pre-commit-config.yaml` yapf workaround path
## Motivation
The package is named `tileops` in `pyproject.toml`, but the source code
previously lived under `top/`. This creates a mismatch between the
package name and the module import path, which is confusing for
contributors and downstream users.
## Test plan
- [x] `pre-commit run --all-files` passed
- [x] `PYTHONPATH="$PWD" python -m pytest tests/ops/test_mha.py` — 6
passed
- [x] `PYTHONPATH="$PWD" python -m pytest tests/ops/test_gemm.py
tests/ops/test_gqa.py tests/functions/test_mha_func.py` — all passed
- [x] `import tileops` works correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>