Skip to content
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

Disable Default CUDA Build, main branch (2024.08.13.) #672

Merged

Conversation

krasznaa
Copy link
Member

This is a bit of a subjective proposal, so I'm interested in the feedback...

To make my life just a little easier, I'd like to stop the project from automatically enabling the build of its CUDA code when it thinks that it found a functional CUDA version. And so be consistent with how the SYCL, Alpaka, etc. sources need to be "turned on" for the build.

My reason is a bit complicated. It stems from the issue described under: https://discourse.cmake.org/t/checklanguage-does-not-take-the-c-standard-into-account When I set up the latest version of oneAPI with the latest version of CUDA, right now I both have to explicitly turn on the build of the SYCL code (for the NVIDIA backend, that's why I also have CUDA set up), and turn off the build of the CUDA code. Unfortunately the sycl preset in CMakePresets.json doesn't do this at the moment. So I can't use VSCode for SYCL code development with the latest oneAPI version at the moment, without modifying the CMake code a little.

Instead of doing that, I thought that this specific update could be acceptable by everyone. This way I could easily use the sycl preset (with VSCode) with the latest oneAPI version, and the cuda preset in a different environment in which I do not set up oneAPI at all.

But this does mean that if one of you didn't use any presets, and didn't set TRACCC_BUILD_CUDA so far when doing CUDA developments, you'd need to have a little longer configuration command from now on. 🤔

@krasznaa krasznaa added the build This relates to the build system label Aug 13, 2024
@krasznaa krasznaa force-pushed the DisableDefaultCUDA-main-20240813 branch from 1e02937 to 3b9731c Compare August 16, 2024 11:05
@krasznaa
Copy link
Member Author

As a little palate cleanser, what about this proposal?

@paulgessinger, @beomki-yeo?

@beomki-yeo
Copy link
Contributor

I don't use preset but do old-school cmake command like ancient people

@krasznaa
Copy link
Member Author

For that case this change means that you'd need to add -DTRACCC_BUILD_CUDA=TRUE explicitly when you want to turn on building the CUDA code. Would that be acceptable?

Right now I need to edit CMakePresets.json locally to do SYCL builds with the latest oneAPI version, in VSCode. This is not the end of the world (I could also add a CMakeUserPresets.json file locally if I were less lazy), but this proposed change can also be looked at as harmonizing the CUDA build with everything else. 😉

Copy link
Contributor

@beomki-yeo beomki-yeo left a comment

Choose a reason for hiding this comment

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

Yeah it is not a big deal

To be consistent with how all other GPU languages are handled,
the CUDA code of the repository now only gets built if the user
explicitly asks for it.
@krasznaa krasznaa force-pushed the DisableDefaultCUDA-main-20240813 branch from 3b9731c to 5aa08e1 Compare August 17, 2024 06:37
@krasznaa krasznaa merged commit 1f79b05 into acts-project:main Aug 17, 2024
23 checks passed
@krasznaa krasznaa deleted the DisableDefaultCUDA-main-20240813 branch August 17, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build This relates to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants