Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shunting314/0d32fe66ba6c771a3cc69574fab359c6 to your computer and use it in GitHub Desktop.
Save shunting314/0d32fe66ba6c771a3cc69574fab359c6 to your computer and use it in GitHub Desktop.
diff --git a/torch/_inductor/ir.py b/torch/_inductor/ir.py
index 95898fe289d..da70d0dde08 100644
--- a/torch/_inductor/ir.py
+++ b/torch/_inductor/ir.py
@@ -1506,6 +1506,9 @@ class Reduction(Loops):
reduction_numel,
input_node,
)
+ print(f"split={split}")
+ if split > 1:
+ split = max(split, 256)
# intermediate reduction in split can contain complex indexing,
# and num_splits will fail to correctly set the hint
# reuse the passed hint if available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment