Skip to content

Commit 5d27a5c

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) (cherry picked from commit 0bdb796)
1 parent 8ca9cbd commit 5d27a5c

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
@@ -2587,6 +2587,15 @@ def pointwise(
25872587
),
25882588
*hinted_configs,
25892589
]
2590+
# Additional reduction configs appended for ROCm builds
2591+
if torch.version.hip:
2592+
configs.append(triton_config_with_settings(
2593+
size_hints,
2594+
2048,
2595+
num_warps=8,
2596+
num_stages=2,
2597+
waves_per_eu=1
2598+
)) # 20% improvement
25902599
if len(size_hints) == 2:
25912600
if (
25922601
disable_pointwise_autotuning(inductor_meta) # or tile_hint == TileHint.SQUARE

0 commit comments

Comments
 (0)