Skip to content

[torchlib] Fix arange for int32 #974

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

Closed
justinchuby opened this issue Aug 4, 2023 · 2 comments · Fixed by #1045
Closed

[torchlib] Fix arange for int32 #974

justinchuby opened this issue Aug 4, 2023 · 2 comments · Fixed by #1045
Labels
bug Something isn't working low priority module: torchlib Related to the torch/aten function lib in development

Comments

@justinchuby
Copy link
Collaborator

Output shape mismatch in edge cases.

@justinchuby justinchuby added module: torchlib Related to the torch/aten function lib in development bug Something isn't working labels Aug 5, 2023
@justinchuby
Copy link
Collaborator Author

justinchuby commented Aug 21, 2023

@fatcat-z would be good to include your findings here, thanks!

@fatcat-z
Copy link
Contributor

fatcat-z commented Sep 4, 2023

Please refer to the PR for more details.

justinchuby added a commit that referenced this issue Sep 7, 2023
ONNX op 'Range' behaves differently with Torch op 'arange' when the
expected output dtype is INT32.

Totally 2 differences are found in two conditions below:

1. 'start' is negative, or 
2. 'step' is negative. 

This PR will make necessary adjustments to make these 2 ops behave same.

Fix #974 .

---------

Co-authored-by: Justin Chu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority module: torchlib Related to the torch/aten function lib in development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants