Skip to content

Commit d273954

Browse files
davidberard98rahulsingh-intel
authored andcommitted
[inductor] set sanitize_overflow=False for triton kernels (pytorch#139502)
In upstream triton, triton-lang/triton#4589 introduces overflow checks. However, overflow checks likely add some overhead, and have some correctness bugs at the moment (e.g. triton-lang/triton#5033). Let's set `sanitize_overflow=False` but keep `debug=True` so that we can keep using device_assert but without the additional asserts added by `sanitize_overflow`. Pull Request resolved: pytorch#139502 Approved by: https://github.com/bertmaher
1 parent f2165b9 commit d273954

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torch/_inductor/runtime/triton_heuristics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ def _precompile_config(self, cfg: Config, warm_cache_only: bool):
442442
"num_warps": compile_meta["num_warps"],
443443
"num_stages": compile_meta["num_stages"],
444444
"debug": compile_meta["debug"],
445+
"sanitize_overflow": False, # turn off additional asserts added for overflow checks
445446
}
446447
if self.device_props.type == "hip":
447448
if "waves_per_eu" in compile_meta:

0 commit comments

Comments
 (0)