Support torch.Tensor.view(dtype) - #2213
Merged
Merged
Conversation
mruberry
reviewed
Jun 10, 2025
crcrpar
force-pushed
the
view-with-dtype
branch
2 times, most recently
from
June 13, 2025 07:11
282664e to
9acdeb7
Compare
crcrpar
force-pushed
the
view-with-dtype
branch
2 times, most recently
from
June 25, 2025 03:55
0029bbf to
fadb532
Compare
Collaborator
Author
t-vi
previously requested changes
Jul 2, 2025
t-vi
left a comment
Collaborator
There was a problem hiding this comment.
This needs
- inplaciness,
- correct semantics
torch.ones(8, dtype=torch.bool).view(torch.int64) # tensor([72340172838076673])Maybe we should also add tests, just incase.
Collaborator
Author
|
hmm, I now think this deserves a separate independent prim or clang op |
Collaborator
Author
|
@t-vi I introduced a new primitive so that we call |
t-vi
reviewed
Jul 10, 2025
Collaborator
|
I think the test which branch to take needs improving . |
Collaborator
Author
|
I'm working on fixing the failures |
crcrpar
commented
Jul 11, 2025
crcrpar
force-pushed
the
view-with-dtype
branch
from
August 6, 2025 05:29
e7a9e51 to
87f0bbc
Compare
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
crcrpar
force-pushed
the
view-with-dtype
branch
from
August 11, 2025 17:03
87f0bbc to
d311ab3
Compare
t-vi
approved these changes
Aug 22, 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.
What does this PR do?
Adding
bitcastprimitive as nvfuser's bitcast op would be used once it's exposed to PythonFixes #2212