-
Notifications
You must be signed in to change notification settings - Fork 608
add handling of out-of-range indices to Slice #3689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3689
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 080024b with merge base 79e9b79 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D57597106 |
Summary: Seeing some ops in graph like: ```aten edge dialect new_k[-self.left_context :, :, :], slice_66: "f32[10, 1, 256]" = torch.ops.aten.slice.Tensor(cat_8, 0, -10, 9223372036854775807); cat_8 = None ``` Negative indices and 9223372036854775807 are valid inputs to `start` and `end` params on slice op, but runtime checks in Slice.cpp don't accept them. (9223372036854775807 is the max value of signed int_64; it maps to the index not being provided.) Adding code to compute the real values to the range [0, size(dim)) Differential Revision: D57597106
2cc1bc9
to
7cecd73
Compare
This pull request was exported from Phabricator. Differential Revision: D57597106 |
7cecd73
to
8733db7
Compare
Summary: Seeing some ops in graph like: ```aten edge dialect new_k[-self.left_context :, :, :], slice_66: "f32[10, 1, 256]" = torch.ops.aten.slice.Tensor(cat_8, 0, -10, 9223372036854775807); cat_8 = None ``` Negative indices and 9223372036854775807 are valid inputs to `start` and `end` params on slice op, but runtime checks in Slice.cpp don't accept them. (9223372036854775807 is the max value of signed int_64; it maps to the index not being provided.) Adding code to compute the real values to the range [0, size(dim)) Reviewed By: jorgep31415 Differential Revision: D57597106
Summary: Seeing some ops in graph like: ```aten edge dialect new_k[-self.left_context :, :, :], slice_66: "f32[10, 1, 256]" = torch.ops.aten.slice.Tensor(cat_8, 0, -10, 9223372036854775807); cat_8 = None ``` Negative indices and 9223372036854775807 are valid inputs to `start` and `end` params on slice op, but runtime checks in Slice.cpp don't accept them. (9223372036854775807 is the max value of signed int_64; it maps to the index not being provided.) Adding code to compute the real values to the range [0, size(dim)) Reviewed By: jorgep31415 Differential Revision: D57597106
This pull request was exported from Phabricator. Differential Revision: D57597106 |
8733db7
to
080024b
Compare
This pull request was exported from Phabricator. Differential Revision: D57597106 |
This pull request has been merged in b8f92df. |
Summary:
Seeing some ops in graph like:
Negative indices and 9223372036854775807 are valid inputs to
start
andend
params on slice op, but runtime checks in Slice.cpp don't accept them.(9223372036854775807 is the max value of signed int_64; it maps to the index not being provided.)
Adding code to compute the real values to the range [0, size(dim))
Differential Revision: D57597106