[frontend] added overflow checks in debug mode#4589
Merged
Conversation
peterbell10
reviewed
Aug 30, 2024
|
|
||
|
|
||
| def binary_op_sanitize_overflow_impl(lhs: tl.tensor, rhs: tl.tensor, builder: ir.builder, binary_op: callable): | ||
| if lhs.type.scalar.int_bitwidth >= 64 or not builder.options.debug: |
Contributor
There was a problem hiding this comment.
Should this be a separate option from enabling asserts generally, so it's possible to enable asserts without running overflow checks in every kernel? I'm thinking specifically of inductor which uses asserts to check indirect indexing expressions, but wouldn't want the performance hit of checking every index calculation.
2bb09c4 to
87660c6
Compare
sfzhu93
pushed a commit
to sfzhu93/triton
that referenced
this pull request
Oct 11, 2024
lezcano
added a commit
to lezcano/triton
that referenced
this pull request
Oct 14, 2024
triton-lang#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
lezcano
added a commit
that referenced
this pull request
Oct 14, 2024
#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
peterbell10
added a commit
that referenced
this pull request
Nov 1, 2024
peterbell10
added a commit
that referenced
this pull request
Nov 1, 2024
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Nov 1, 2024
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: #139502 Approved by: https://github.com/bertmaher
rahulsingh-intel
pushed a commit
to rahulsingh-intel/pytorch
that referenced
this pull request
Nov 5, 2024
…9502) 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
Luosuu
pushed a commit
to Luosuu/triton
that referenced
this pull request
Nov 13, 2024
Luosuu
pushed a commit
to Luosuu/triton
that referenced
this pull request
Nov 13, 2024
triton-lang#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
Luosuu
pushed a commit
to Luosuu/triton
that referenced
this pull request
Nov 13, 2024
guacamoleo
pushed a commit
to guacamoleo/triton
that referenced
this pull request
Nov 14, 2024
guacamoleo
pushed a commit
to guacamoleo/triton
that referenced
this pull request
Nov 14, 2024
triton-lang#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
guacamoleo
pushed a commit
to guacamoleo/triton
that referenced
this pull request
Nov 14, 2024
bertmaher
pushed a commit
to bertmaher/triton
that referenced
this pull request
Dec 10, 2024
bertmaher
pushed a commit
to bertmaher/triton
that referenced
this pull request
Dec 10, 2024
triton-lang#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
yilei
pushed a commit
to anthropics/triton
that referenced
this pull request
Aug 7, 2025
liuyunqi20
pushed a commit
to flagos-ai/FlagTree
that referenced
this pull request
Oct 21, 2025
triton-lang/triton#4589 mistakenly deactivated these and reverted to the previous always-cast-to-int32 semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.