Skip to content

Commit 65d1e79

Browse files
jataylopruthvistony
authored andcommitted
Scale XBLOCK in triton reduction configs to avoid hitting max grid (#1434)
1 parent 92afbf0 commit 65d1e79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/_inductor/runtime/triton_heuristics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ def triton_config_reduction(size_hints, x, r, num_stages=1, num_warps=None) -> C
13481348
if num_warps is None:
13491349
num_warps = conditional_product(x, r) // 128
13501350
# On AMD GPU each warp has 64 lanes which is double the size on NV GPU,
1351-
# therefore using half the number of warps here correspondingly.
1351+
# therefore using half the number of warps here correspondingly.i
13521352
default_num_warps = 4 if torch.version.hip else 8
13531353
min_num_warps = 1 if torch.version.hip else 2
13541354
num_warps = next_power_of_2(min(max(num_warps, min_num_warps), default_num_warps))

0 commit comments

Comments
 (0)