-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Allow relaxed function pointer support in frontend #17274
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: sycl
Are you sure you want to change the base?
Conversation
The patch enables the use of function pointer if the function has the indireclty callable attribute or is has a body. This makes easier to support code ported over from cuda.
How a user could understand if a platform supports function pointers? Is there an aspect they could check, or is there a documentation for that?
Does it imply that the suggested function pointers syntax is the final for SYCL? Because if not, I don't think that it is the best step in simplifying code porting because that code will have to be rewritten anyway. Note that we do not have a language extension specification which would document the attribute |
For the use case I'm doing this work for (CUTLASS), yes. When targeting nvidia, they want to keep the code as is. CUDA supports function pointers and so it is used. It is always used with defined function, hence the addition this relaxed mode: because the code will be in the TU, we don't need about a host API to make the code available (unlike VTable, but you know that better than me). Though your comment made rethink that we shouldn't expose the flag as a driver one, will revert that part.
Well aware of this, but that's intended to be used in pair with |
More comment on this PR ? |
@AlexeySachkov more comments ? |
@intel/llvm-gatekeepers this ready to be merged, failure are due to CI node having issues |
I'd like to see a completed windows build before merging |
CI isn't working |
I understand CI isn't working,
I can see that CI has failed for this run, but that doesn't mean your code isn't broken on Win32 with MSVC. I will merge if another windows runner can build this |
same issue with this PR #17552 |
I gave more RAM to the Windows build VMs, so can you try again @Naghasan Thx |
that will clash with #17559, so please hold the merge thanks |
The patch enables the use of function pointer if the function has the indirectly callable attribute or is has a body. If the platform support function pointers, this allow extended support without requiring an interface to migrate / manage code available from the host.
The behaviour is control via an option on the
-fsycl-allow-func-ptr
flag.This makes easier to support code ported over from cuda or using this mode #12757