Skip to content

Commit 5a13c79

Browse files
committed
[ROCm][inductor] Additional pointwise tunings (#2642)
This config improves the performance of a 1D pointwise kernel by 20% as measured on MI350. (cherry picked from commit a7bac0a)
1 parent 2c417db commit 5a13c79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

torch/_inductor/runtime/triton_heuristics.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,15 @@ def pointwise(
24912491
),
24922492
*hinted_configs,
24932493
]
2494+
# Additional reduction configs appended for ROCm builds
2495+
if torch.version.hip:
2496+
configs.append(triton_config_with_settings(
2497+
size_hints,
2498+
2048,
2499+
num_warps=8,
2500+
num_stages=2,
2501+
waves_per_eu=1
2502+
)) # 20% improvement
24942503
if len(size_hints) == 2:
24952504
if (
24962505
disable_pointwise_autotuning(inductor_meta) # or tile_hint == TileHint.SQUARE

0 commit comments

Comments
 (0)