Address Tile kernel dim overflow and generate tests#27566
Merged
yuslepukhin merged 7 commits intomainfrom Mar 10, 2026
Merged
Conversation
guschmue
previously approved these changes
Mar 6, 2026
Member
Author
|
/azp run Test Linux CUDA x64 Release, Test Linux TensorRT x64 Release |
|
No pipelines are associated with this pull request. |
guschmue
approved these changes
Mar 10, 2026
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 16, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 16, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 16, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 17, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 17, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
GopalakrishnanN
pushed a commit
that referenced
this pull request
Apr 24, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
This was referenced Apr 27, 2026
GopalakrishnanN
pushed a commit
that referenced
this pull request
May 1, 2026
The per-axis SafeInt multiplication added in #27566 detects overflow when computing an individual output dimension, but combinations of per-axis repeats can still request an int64-representable total that is unreasonably large. Add a 4 GiB upper bound on the total tiled byte count in both the CPU and CUDA Tile kernels, and extend the unit tests to cover this case.
This was referenced May 4, 2026
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.
This pull request strengthens the input validation and error handling for the
Tileoperator in both CPU and CUDA implementations. It introduces checks to ensure repeat values are non-negative and that output shape computations do not overflow, improving robustness and reliability. Comprehensive unit tests are added to verify these behaviors.Input validation and error handling:
tile.cc) and CUDA (tile.cc) implementations to reject negative repeat values, returning a clear error message when encountered. [1] [2]SafeInt<int64_t>multiplication, ensuring that integer overflows are detected and handled properly. [1] [2]Code consistency and refactoring:
ranktoinput_rankfor clarity and consistency across the CUDA implementation, updating all related usages. [1] [2] [3] [4]Unit testing improvements:
tile_op_test.ccto verify rejection of negative repeat values and to confirm that overflow in output dimension computation is properly detected for various data types and tensor shapes.### Description