Skip to content

Conversation

@rbourgeois33
Copy link

@rbourgeois33 rbourgeois33 commented Jun 16, 2025

Co-authored-by: Thomas Padioleau <[email protected]>
@mattgodbolt
Copy link
Member

I'm trying to understand what this is doing: it seems to duplicate the kokkos we already have elsewhere? They both install to the same directory so... the second copy does nothing:

 $ ce_install install kokkos 4.6.01
2025-06-16 09:45:37,614 lib.installation_context INFO     Making uncached requests
2025-06-16 09:45:37,615 lib.ce_install  INFO     Creating thread pool with 8 workers
Installing libraries/c++/kokkos 4.6.01
2025-06-16 09:45:43,958 lib.ce_install  INFO     libraries/c++/kokkos 4.6.01 is already installed, skipping
Installing libraries/kokkos 4.6.01
2025-06-16 09:45:43,958 lib.ce_install  INFO     libraries/kokkos 4.6.01 is already installed, skipping
0 packages installed OK, 2 skipped, and 0 failed installation
bollo:~/d/c/infra (rbourgeois33-main|✔) 6.9s $ 

Can you explain what you're trying to achieve here? Do we need to change our existing kokkos to build with extra flags? Do we really need two separate copies of the Kokkos library? If so we'll need to change some paths.

Or am I missing something? :)

@rbourgeois33
Copy link
Author

rbourgeois33 commented Jun 16, 2025

As discussed in the discord:

Kokkos is a compile-time polymorphic library. It requires separate build for separate backends (one for CPU, one for GPU)

We can keep one "clone" of kokkos but we do need two separate builds/installs.

Practically, this can be done in seperate build folders with e.g. cmake -B build_gpu

If a new GPU architecture needs to be supported, a third install will be necessary (and so forth)

@dalg24
Copy link
Contributor

dalg24 commented Jun 17, 2025

Can you post a link to the discord discussion?
If the command to install a C++ library VS CUDA C++ library does not specify the language then I see how that will be ambiguous and we probably need to suffix the new package (kokkos -> kokkos-cuda)

@rbourgeois33
Copy link
Author

Here it is:

https://discord.gg/B5WacA7

channel: ce-dev-discussions

@mattgodbolt
Copy link
Member

I'm sorry I didn't get back to this! I've been at a conference and I'll be on holiday next week. Will try and get this working..

- 1.16.0
- 1.17.0
type: github
kokkos:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need to find a way to install this in a different directory to the other kokkos; as these currently will land in the same directory. I'll clone locally and see if I can get this working.

Copy link
Member

@mattgodbolt mattgodbolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No guarantee it'll work exactly as intended as I doubt our builder box has the GPU stuff installed, but this will stop it trying to install over the top of the "normal" kokkos.

- 1.16.0
- 1.17.0
type: github
kokkos:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok tested locally and please make this change:

-  kokkos:
+  gpu:
+    kokkos:
+      subdir: gpu/kokkos

that is, put the kokkos under a gpu heading, and set its subdir: to gpu/kokkos which will then mean:

"Normal" kokkos installs at /opt/compiler-explorer/libs/kokkos/...
"GPU" kokkos installs at /opt/compiler-explorer/libs/gpu/kokkos/...

@rbourgeois33
Copy link
Author

I'm sorry I didn't get back to this! I've been at a conference and I'll be on holiday next week. Will try and get this working..

No rush ! Thank again for taking time to do this. The Kokkos community is thankful :)

No guarantee it'll work exactly as intended as I doubt our builder box has the GPU stuff installed, but this will stop it trying to install over the top of the "normal" kokkos.

Let me know if my last commit does the job, maybe I should have indented the following lines ?

Cheers !

@mattgodbolt
Copy link
Member

Thanks @rbourgeois33 that does the trick. Seems we still need some infrastrucutre changes on our side too though

@tpadioleau
Copy link
Contributor

Thanks @rbourgeois33 that does the trick. Seems we still need some infrastrucutre changes on our side too though

Hi @mattgodbolt! Do you have an update on the status of those changes ?

@mattgodbolt
Copy link
Member

I'm sorry, no, it's not been something we've prioritised! I appreciate that's frustrating, and it being infrastructurla makes it a little harder to solicit external help (though the code is OSS if you want to poke around; likely as not @partouf or I need to have a think about it though)

@tpadioleau
Copy link
Contributor

I'm sorry, no, it's not been something we've prioritised! I appreciate that's frustrating, and it being infrastructurla makes it a little harder to solicit external help (though the code is OSS if you want to poke around; likely as not @partouf or I need to have a think about it though)

Don't worry we understand. We are wondering if there could be any trick on the library side that could ease the deployment. For example if we rename our library, let's say kokkos-cuda, could it be helpful ?

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.

5 participants