Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions torch/_inductor/runtime/triton_heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2595,20 +2595,20 @@ def _persistent_reduction_configs(
elif reduction_hint == ReductionHint.OUTER:
configs = configs[-1:]

if reduction_hint == ReductionHint.OUTER_TINY:
tiny_configs = [
triton_config_reduction(
size_hints,
2 * (256 // rnumel) if rnumel <= 256 else 1,
rnumel,
)
]
if max_autotune_enabled:
for tconfig in tiny_configs:
if tconfig not in configs:
configs.append(tconfig)
else:
configs = tiny_configs
tiny_configs = [
triton_config_reduction(
size_hints,
2 * (256 // rnumel) if rnumel <= 256 else 1,
rnumel,
)
]

if max_autotune_enabled:
for conf in tiny_configs:
if conf not in configs:
configs.append(conf)
elif reduction_hint == ReductionHint.OUTER_TINY:
configs = tiny_configs

for c in configs:
# we don't need Rn_BLOCK for persistent reduction
Expand Down