-
Notifications
You must be signed in to change notification settings - Fork 520
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
Added support for torch arange float module #2749
Added support for torch arange float module #2749
Conversation
…com:Abhishek-TyRnT/torch-mlir into Added-support-for-torch-arange-float-module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
CI doesn't seem to pick up jobs... Is there any reason? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't going to work for large 64-bit integers, because casting to double will be lossy (mantissa of double is 52 bits, so 2^53 + 1 can't be represented as a double).
You are right. I will try to find a way to fix this. |
I guess there will be no loss if we use long double instead of double. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, just the final comment for the int case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic looks good to me. I think the code can be polished a little bit though :-)
Hi @newling. The int64 test suddenly started failing cause mlir couldn't typecast float32 or float64 to int64. So I manually typecasted them Torch-to-Tosa pass. |
The CI failure doesn't seem it to be a issue with TorchToTosa but something in stablehlo unexpectedly passing. |
Ok. You might need to update the xfail set? #2927 |
I just checked, that test has been added there. It should hopefully pass now |
Now that it has passed. Can you please merge it. @newling |
Hi @Abhishek-TyRnT I've made a PR against this which should fix the link checks. It also makes some stylistic improvements (IMO) which you can consider pulling in if you like: Abhishek-TyRnT#1 |
…orch-arange-float-module Formatting and stylistic changes
Added Support for float dtype in in torch.arange in TOSA Dialect
This resolves the following issue :-
#2762
The following test cases are passing after this change