Skip to content

Commit f5c4bbd

Browse files
naromero77amdjataylo
authored andcommitted
[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 bbd048b commit f5c4bbd

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
@@ -2417,6 +2417,15 @@ def pointwise(
24172417
),
24182418
*hinted_configs,
24192419
]
2420+
# Additional reduction configs appended for ROCm builds
2421+
if torch.version.hip:
2422+
configs.append(triton_config_with_settings(
2423+
size_hints,
2424+
2048,
2425+
num_warps=8,
2426+
num_stages=2,
2427+
waves_per_eu=1
2428+
)) # 20% improvement
24202429
if len(size_hints) == 2:
24212430
if (
24222431
disable_pointwise_autotuning(inductor_meta) # or tile_hint == TileHint.SQUARE

0 commit comments

Comments
 (0)