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

[cmake] Use separate FetchSource's per adapter #831

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Aug 28, 2023

While attempting to enable the Level-Zero and OpenCL adapters at the same time git will report an error due to the OpenCL tag not existing in the intel/llvm clone use for the Level-Zero adapter. Furthermore, if I wanted to test separate bug fixes for the CUDA and HIP adapters from different sources, this would also not be possible.

This patch uses a separate FetchSource for each adapter to allow each adapters source to be fetched independently of the others and moves those clones into the build directory. This does result in additional git clones when enabling multiple adapters and again in multiple build directories but avoids conflicting remote URL's or multiple build configurations trampling on each others checked out tags.

@kbenzie kbenzie changed the base branch from main to adapters August 28, 2023 15:08
@kbenzie kbenzie changed the title benie/adapters separate clones [cmake] Use separate FetchSource's per adapter Aug 28, 2023
@kbenzie kbenzie requested review from fabiomestre and pbalcer and removed request for fabiomestre August 28, 2023 15:09
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

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

This will make the configure step on my PC quite a bit longer (I usually build with everything enabled) ;) But I can see the point, especially for OpenCL.

source/adapters/CMakeLists.txt Outdated Show resolved Hide resolved
While attempting to enable the Level-Zero and OpenCL adapters at the
same time git will report an error due to the OpenCL tag not existing in
the intel/llvm clone use for the Level-Zero adapter. Furthermore, if I
wanted to test separate bug fixes for the CUDA and HIP adapters from
different sources, this would also not be possible.

This patch uses a separate FetchSource for each adapter to allow each
adapters source to be fetched independently of the others and moves
those clones into the build directory. This does result in additional
git clones when enabling multiple adapters and again in multiple build
directories but avoids conflicting remote URL's or multiple build
configurations trampling on each others checked out tags.
@kbenzie kbenzie force-pushed the benie/adapters-separate-clones branch from ff8a8d0 to 789adb0 Compare August 29, 2023 09:37
@kbenzie
Copy link
Contributor Author

kbenzie commented Aug 29, 2023

This will make the configure step on my PC quite a bit longer

Yeah, its not ideal. I have found its only the first time configure that is slow, subsequent reconfigures are much quicker.

Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

👍

@kbenzie kbenzie merged commit fa4b5cf into oneapi-src:adapters Aug 29, 2023
38 checks passed
@kbenzie kbenzie deleted the benie/adapters-separate-clones branch January 29, 2024 13:49
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.

4 participants