-
Notifications
You must be signed in to change notification settings - Fork 59
Add exception to float->int conversion test case #2105
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
base: main
Are you sure you want to change the base?
Conversation
Downcasting float32 values beyond target type value range is an undefined behaviour according to torch documentation.
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.
Pull Request Overview
Adds an exception to handle undefined behavior in float-to-integer conversion test cases for XPU devices. The PR addresses cases where downcasting float32 values beyond the target integer type's value range leads to undefined behavior.
- Extended the conditional check to include XPU alongside HIP for handling divergent float-to-int conversion
- Added explanatory comments for XPU's divergent behavior with int8 and int16 conversions
- Applied minor code formatting improvements to the dtypesIfCUDA decorator
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Could you please remove the two related cases from skip list in the same PR? |
@daisyden I have added unskip, and I am waiting for review. |
Downcasting float32 values beyond target type value range is an undefined behaviour according to torch documentation.