-
Notifications
You must be signed in to change notification settings - Fork 46
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
Hip updates main #511
Hip updates main #511
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very surprised about the TRACCC_HOST_DEVICE
additions. 😕 These functions are clearly not needed by the CUDA code. (Otherwise that build would've failed.) So how are they needed by Alpaka when using the HIP backend? 😕
I knew for a while already that a couple more "common functions" will need to become TRACCC_HOST_AND_DEVICE
from their current TRACCC_DEVICE
status when finally we pick those up with Kokkos and Alpaka. But I did not expect any function, which was so far not marked as having to be a "device function" at all, to need such additions.
I guess I'll need to have a closer look at your Alpaka code... 🤔
Hi Attila, I can reproduce the host device issue standalone: You can see that rocm needs the declaration to match the definition (i.e. |
Ahh... I didn't appreciate that what you're doing here is to fix the inconsistency between the declaration and implementation of these functions. 🤔 Yes, that's definitely a bug in our current code... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you run the changes through clang-format
, I'll be okay with this. 😉
I.e.
docker run -it --rm -v $PWD:$PWD -w $PWD --user "$(id -u):$(id -g)" ghcr.io/acts-project/format10:v11
./traccc/.github/check_format.sh ./traccc/
@krasznaa should I merge from main again? |
Merged into main to try out my new CI bridge privileges in any case |
My own preference is to use rebasing in such cases, but this works fine as well... |
716eb7a
to
e306935
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
I don't know how to remove the WIP block :( |
As proposed by @krasznaa in acts-project/vecmem#261, extend the host and device macros for HIP.
Clang wanted TRACCC_HOST_DEVICE to be added to the function definition as well in a couple of places. I could not get compilation to work with gcc. Wasn't clear to me if this was supported at all.
I now get as far as a puzzling linker error:
but I think this is separate and that these changes are safe.