Index converter dynamic cases fix - #3694
Merged
Merged
Conversation
Collaborator
|
The index dtype validator doesn't support bool type (Pdb) node.args
(_reshape_copy_597, [eq_1427])
(Pdb) node.args
(_reshape_copy_597, [eq_1427])
(Pdb) node.args[0].dtype
*** AttributeError: 'Node' object has no attribute 'dtype'
(Pdb) node.args[0].meta['val']
FakeTensor(..., device='cuda:0', size=(s43*s53, 2048), dtype=torch.float16)
(Pdb) node.args[0].meta['val'].dtype
torch.float16
(Pdb) node.args[1][0].meta['val'].dtype
torch.boolThe inputs to index are FP16 and bool. In this case, converter is not being invoked and falls back to PyTorch |
Collaborator
Author
|
oh ok, looks like in https://github.com/zdevito/ATen/blob/master/aten/src/ATen/native/native_functions.yaml#L1324 tensor indices as bool should denote mask then. I think a non zero layer to get the corresponding indices should work. I will push in the change |
apbose
force-pushed
the
abose/index_dynamic_fix
branch
from
July 31, 2025 20:49
e5aae73 to
a14fc4c
Compare
apbose
force-pushed
the
abose/index_dynamic_fix
branch
from
July 31, 2025 23:02
1834500 to
663fbe3
Compare
lanluo-nvidia
approved these changes
Aug 19, 2025
lanluo-nvidia
left a comment
Collaborator
There was a problem hiding this comment.
One comment, please take a look, others LGTM
7 tasks
apbose
force-pushed
the
abose/index_dynamic_fix
branch
3 times, most recently
from
August 26, 2025 05:59
19c0703 to
a43302c
Compare
apbose
force-pushed
the
abose/index_dynamic_fix
branch
from
August 26, 2025 17:32
a43302c to
3a2969c
Compare
Collaborator
Author
|
I think the tests are passing related to this test. @peri044 could you please review? |
peri044
reviewed
Aug 29, 2025
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 PR-