-
Notifications
You must be signed in to change notification settings - Fork 128
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
[CIR][HIP] Use CUDA attributes for HIP global functions #1333
[CIR][HIP] Use CUDA attributes for HIP global functions #1333
Conversation
I'm not sure about HIP, but see this commit in upstream OG. It does some changes specific to HIP there.
So you might need to generate a 'handle' variable. It's different from CUDA since for CUDA the handle is just the device stub. Whether you attach the attribute to handle or the device stub depends on how HIP works - I don't quite know about it. The attribute is used in CUDA to register the correspondence between host and device; the same kernel is mangled differently in host and device, so we need some runtime registration to map host names to device names. This registration function is going to be emitted in LLVM lowering (not written yet). |
I was planning on doing this redirection when I actually generate the stub function (the respective #1332) . |
That makes sense. |
@bcardosolopes what do you think? Should I introduce a new attribute or re-use the cuda one and handle it during the generation of the device stub? |
Incremental is fine!
We should reuse if it there isn't much difference (in which case maybe rename |
Note this PR invalidates test |
Broke CI jobs This reverts commit db307ce.
No description provided.