TileOPs-Metax/docs/perf
Cao Ying e021408b7a
[Enhancement][Elementwise] Deploy strategy-aware npt defaults for fp16/bf16 (#562)
## Summary

Implement strategy-aware `default_config` so that `explicit_parallel`
uses `npt=4` for fp16/bf16 while `register_copy` retains `npt=8`,
unlocking a measured 58% bandwidth improvement.

Closes #553

## Changes

- Add `_strategy_npt()` helper in `tileops/kernels/elementwise.py` that
returns optimal `num_per_thread` per strategy+dtype pair
- `explicit_parallel` fp16/bf16: npt=4 (was 8) -- 58% bandwidth
improvement
- `register_copy` fp16/bf16: npt=8 (unchanged) -- no regression
- fp32: npt=4 for both strategies (unchanged)
- fp8: npt=16 for both strategies (unchanged)
- Updated `docs/perf/elementwise-evidence.md` with deployment note

## Test plan

- [x] Modified files pass unit tests (124 tests pass)
- [x] `explicit_parallel` strategy uses npt=4 for fp16/bf16 by default
- [x] `register_copy` strategy retains npt=8 for fp16/bf16
- [x] Benchmark: 58% bandwidth improvement for explicit_parallel fp16 at
(1024, 10240) vs npt=8 default (threshold: >= 30%)
- [x] No regression in register_copy strategy benchmarks
- [x] docs/perf/elementwise.md updated with final measured values

## Benchmark

| Config | npt | BW (TB/s) | vs old |
|---|---|---|---|
| explicit_parallel fp16 | 4 (new) | 1.708 | +58.1% |
| explicit_parallel fp16 | 8 (old) | 1.081 | baseline |
| register_copy fp16 | 8 (unchanged) | 3.940 | no regression |

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 18:44:46 +08:00
..
README.md [Doc] Add elementwise kernel performance checklist and evidence (#556) 2026-03-17 20:15:02 +08:00
elementwise-evidence.md [Enhancement][Elementwise] Deploy strategy-aware npt defaults for fp16/bf16 (#562) 2026-03-19 18:44:46 +08:00
elementwise.md [Perf][Elementwise] Generalize kernel caching and autotune to all kernel families (#560) 2026-03-18 20:11:41 +08:00

README.md

Performance Guides

Empirical performance lessons per op category. Each category has:

  • Checklist — heuristic rules for audit (lightweight, always load)
  • Evidence — measured data and reasoning (load on demand)

Test Environment

All conclusions are scoped to this configuration. Re-validate when any component changes.

Component Value
GPU NVIDIA H200 (HBM3e, 4.8 TB/s peak, SM_90a)
Driver / CUDA 575.57.08 / 12.8
PyTorch 2.9.1+cu128
TileLang 0.1.8
Profiler CUPTI (primary); CUDA event+median fallback when CUPTI singleton unavailable

Index

Category Checklist Evidence
Elementwise elementwise.md elementwise-evidence.md