-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
spirv: saturating arithmetic implementation #24317
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: master
Are you sure you want to change the base?
Conversation
cc @alichraghi |
This comment was marked as resolved.
This comment was marked as resolved.
cef8c1f
to
63831d8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
the tests on
Also, i genuinely ask you to avoid using AI to fix the spirv backend. Though, you're welcome to ask me questions about SPIR-V at any time! |
Nice. I didn't know about this test, I have only tested locally with simple kernel. Personally I like builder functions more than duplicating one for I will try to run tests now. I will also add missing tests, so #24315 never regress. |
Seems like riscv64 does not know how to subtract zero from signed integers. |
This PR implements saturating arithmetic, like
+|
,-|=
, etc for SPIR-V. It emulates the behavior like GCC STL does, without using special opcodes from the extended set (like OpenCL.std). I need this for Tsetlin machine implementation.