Skip to content

Commit af5f678

Browse files
naromero77amdjataylo
authored andcommitted
[ROCm][inductor] Additional pointwise tunings (ROCm#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 04aa3e4 commit af5f678

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
@@ -2488,6 +2488,15 @@ def pointwise(
24882488
),
24892489
*hinted_configs,
24902490
]
2491+
# Additional reduction configs appended for ROCm builds
2492+
if torch.version.hip:
2493+
configs.append(triton_config_with_settings(
2494+
size_hints,
2495+
2048,
2496+
num_warps=8,
2497+
num_stages=2,
2498+
waves_per_eu=1
2499+
)) # 20% improvement
24912500
if len(size_hints) == 2:
24922501
if (
24932502
disable_pointwise_autotuning(inductor_meta) # or tile_hint == TileHint.SQUARE

0 commit comments

Comments
 (0)