Skip to content

Commit a13015c

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) (cherry picked from commit af5f678)
1 parent d13e652 commit a13015c

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
@@ -1899,6 +1899,15 @@ def pointwise(
18991899
),
19001900
*hinted_configs,
19011901
]
1902+
# Additional reduction configs appended for ROCm builds
1903+
if torch.version.hip:
1904+
configs.append(triton_config_with_settings(
1905+
size_hints,
1906+
2048,
1907+
num_warps=8,
1908+
num_stages=2,
1909+
waves_per_eu=1
1910+
)) # 20% improvement
19021911
if len(size_hints) == 2:
19031912
if (
19041913
disable_pointwise_autotuning(inductor_meta) # or tile_hint == TileHint.SQUARE

0 commit comments

Comments
 (0)