Skip to content

kokkos: build kokkos in language mode#2184

Draft
JBludau wants to merge 1 commit into
compiler-explorer:mainfrom
JBludau:kokkos_use_cuda_language
Draft

kokkos: build kokkos in language mode#2184
JBludau wants to merge 1 commit into
compiler-explorer:mainfrom
JBludau:kokkos_use_cuda_language

Conversation

@JBludau

@JBludau JBludau commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Currently Kokkos is using a launcher, but we also have an option to be usable in the CUDA language mode.
I hope this makes things easier. Followup to #2172 and #2182

@JBludau

JBludau commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@partouf I noticed that Kokkos does not show up for NVCC, I was thinking just ditching the compiler launcher and using the language mode would be easier here. But this is just a suggestion.

@partouf

partouf commented Jun 18, 2026

Copy link
Copy Markdown
Member

This has nothing to do with that. i'll investigate, but likely cause is gpu properties and/or gpu instance not updated

@partouf

partouf commented Jun 18, 2026

Copy link
Copy Markdown
Member

should be now live, please have a look

@partouf partouf marked this pull request as draft June 18, 2026 18:02
@JBludau

JBludau commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@partouf it is selectable for NVCC but still shows 'Kokkos_Core.hpp' file not found

@partouf

partouf commented Jun 18, 2026

Copy link
Copy Markdown
Member

its not clear to me why its not working, ill have to debug locally

@partouf

partouf commented Jun 18, 2026

Copy link
Copy Markdown
Member

should now work, though i don't know how best to test it (getting some errors when trying to include etc)

@JBludau

JBludau commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

That would be a minimal reproducer: https://godbolt.org/z/83nY6EEEd
It still complains that the header is not found except for NVCC-13

@partouf

partouf commented Jun 19, 2026

Copy link
Copy Markdown
Member

That would be a minimal reproducer: https://godbolt.org/z/83nY6EEEd It still complains that the header is not found except for NVCC-13

It's among our 'less popular' compilers (because its newer) and so its automatic build will be performed on a Sunday.

@JBludau

JBludau commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

I just found out that the linker problems are related to the coda-driver (-lcuda), see https://godbolt.org/z/c49EzTKW6

@partouf

partouf commented Jun 20, 2026

Copy link
Copy Markdown
Member

this is the current driver installed on our gpu instances: https://github.com/compiler-explorer/infra/blob/main/setup-gpu-node.sh#L25

@JBludau

JBludau commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

this is the current driver installed on our gpu instances: https://github.com/compiler-explorer/infra/blob/main/setup-gpu-node.sh#L25

The driver itself is fine, it is just that it does not automatically get linked when adding the library. Similarly to other flags like -extended-lambda that Kokkos exports in its cmake config.
https://godbolt.org/z/c49EzTKW6 shows that if I add the flags manually, it compiles and can execute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants