-
Notifications
You must be signed in to change notification settings - Fork 72
Update TorchTensor to use ml_dtypes #2201
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
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
onnxscript/ir/tensor_adapters.py:85
- Ensure that the use of .view() on the numpy array is appropriate for converting to the target ml_dtype, since numpy view semantics require careful consideration of data alignment and compatibility.
self.raw.view(torch.uint16).numpy(force=True).view(self.dtype.numpy())
onnxscript/ir/tensor_adapters.py:83
- [nitpick] Consider adding test cases to verify the correct behavior of the dtype conversion logic when using ml_dtypes for both BF16 and FLOAT8 conversions.
if self.dtype == ir.DataType.BFLOAT16:
❌ 8 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Bring changes from pytorch/pytorch#151259 to correctly support bfloat16 and float8* types.