-
Notifications
You must be signed in to change notification settings - Fork 778
Reapply "[libspirv] Define schar overloads via remangling; not source… #18864
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
… … (intel#18821)" This reapplies commit 23584c1. It also includes changes from intel#18807 which attempt to address the issues that led to the original revert. We were previously achieving the signed char builtin definitions in libspirv via one of two ways. The first was explicitly definining schar overloads of builtins in the source. The second was by remangling 'char' builtins to one of schar or uchar, depending on the host platform. Since we are defining our builtins in OpenCL C, the plain 'char' type is already a signed type. This presents us with the opportunity to achieve our desired schar builtins solely through remangling. The primary idea is to reduce our libclc/libspirv diff with upstream. We also have the option to introduce signed char builtins upstream. As it stands the schar problem isn't far from the 'half' mangling problem that we also now deal with purely in the remangler.
@hvdijk I don't suppose you're wanting to try building native-cpu SYCL-CTS with this patch? I believe it should now do the right thing 🤞 . |
Thanks, I'll run tests tonight! |
The testing on Native CPU completed and showed no regressions. I think the added |
Yes you're probably right. Ideally both, to be honest. I like the idea of having quick-failing tests that show if the host mangling changes - but I'm surprised at how difficult it is to get cross-platform tests like this working (preferably with But yes I've already strayed from being |
ping, thanks. I believe the Windows failure is #18892 |
Thanks for all the suggestions @maarquitos14 - I've applied them all 👍 |
ping @intel/dpcpp-cfe-reviewers thanks |
… … (#18821)"
This reapplies commit 23584c1. It also includes changes from #18807 which attempt to address the issues that led to the original revert.
We were previously achieving the signed char builtin definitions in libspirv via one of two ways. The first was explicitly definining schar overloads of builtins in the source. The second was by remangling 'char' builtins to one of schar or uchar, depending on the host platform.
Since we are defining our builtins in OpenCL C, the plain 'char' type is already a signed type. This presents us with the opportunity to achieve our desired schar builtins solely through remangling. The primary idea is to reduce our libclc/libspirv diff with upstream. We also have the option to introduce signed char builtins upstream. As it stands the schar problem isn't far from the 'half' mangling problem that we also now deal with purely in the remangler.