-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
False warnings on unsigned integer overflow #4210
Labels
potential bug
Something that looks like a bug but not yet confirmed
Comments
igor-elovikov
added
the
potential bug
Something that looks like a bug but not yet confirmed
label
Feb 4, 2022
Thanks for reporting! This warning is produced since we created |
ailzhang
pushed a commit
to ailzhang/taichi
that referenced
this issue
Feb 7, 2022
Fixes taichi-dev#4210 This PR also simplifies the clamping logic by: 1. Make sure constant is valid in range of specified dtype. 2. Always use int64/float64 to communicate between python and C++ and converts it to the specified dtype in C++. This is just to avoid handling each dtype on both python and C++ side.
ailzhang
pushed a commit
to ailzhang/taichi
that referenced
this issue
Feb 7, 2022
Fixes taichi-dev#4210 This PR also simplifies the clamping logic by: 1. Make sure constant is valid in range of specified dtype. 2. Always use int64/float64 to communicate between python and C++ and converts it to the specified dtype in C++. This is just to avoid handling each dtype on both python and C++ side. We might consider further improve it by moving this logic from python to C++ in the future and this PR made it a step closer.
ailzhang
pushed a commit
to ailzhang/taichi
that referenced
this issue
Feb 7, 2022
Fixes taichi-dev#4210 This PR also simplifies the clamping logic by: 1. Make sure constant is valid in range of specified dtype. 2. Always use int64/float64 to communicate between python and C++ and converts it to the specified dtype in C++. This is just to avoid handling each dtype on both python and C++ side. We might consider further improve it by moving this logic from python to C++ in the future and this PR made it a step closer.
ailzhang
pushed a commit
to ailzhang/taichi
that referenced
this issue
Feb 8, 2022
Fixes taichi-dev#4210 This PR also simplifies the clamping logic by: 1. Make sure constant is valid in range of specified dtype. 2. Always use int64/float64 to communicate between python and C++ and converts it to the specified dtype in C++. This is just to avoid handling each dtype on both python and C++ side. We might consider further improve it by moving this logic from python to C++ in the future and this PR made it a step closer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Weird warnings about unsigned integer exceeding the range
To Reproduce
Log/Screenshots
Additional comments
It wasn't actually clamped and kernel works correctly as far as I can tell, so basically it's just about false warnings
The text was updated successfully, but these errors were encountered: