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

Feature gpu compile options #237

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Feature gpu compile options #237

merged 4 commits into from
Dec 10, 2024

Conversation

EdAtkin
Copy link
Contributor

@EdAtkin EdAtkin commented Dec 9, 2024

Pull request description

Making separate GPU and CPU compiler options. This is primarily so that CPU-only flags can be exported more easily to NuOscillator without the need to do some horrible regex comparisons.

Changes or fixes

A separate GPU option now exists where all of the CUDA-related flags now live.

Examples

With GPU enabled you can see the MaCh3GPUCompilerOptions and MaCh3CompilerOptions getting printed out
Screenshot_20241210_130229

With CPU-only you can see only MaCh3Compiler options getting printed out
Screenshot_20241210_130527

… setting up NuOscillator much easier as we need to pass the CPU compiler flags to NuOscillator
Copy link

github-actions bot commented Dec 9, 2024

Hi @EdAtkin, thank you for contributing to MaCh3! Please wait for MaCh3 developers to review your PR. If no one answers within a week, please message people from this list: https://github.com/orgs/mach3-software/teams/mach3admin . While waiting, please enjoy this

meme

Use this action on your projects. Use jokes on issues instead.

@github-actions github-actions bot added Nu Osc/Xsec Related with neutrino interactions or oscialtions Manager Cmake labels Dec 9, 2024
CMakeLists.txt Outdated
Comment on lines 24 to 25
#Create a seperate target for GPU compiler options
add_library(MaCh3GPUCompilerOptions INTERFACE)
Copy link
Member

Choose a reason for hiding this comment

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

can you just move it away from if GPU?

But make it empty for CPU only build? I wonder if this will not simplyfy logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep good point! I've changed this both in the main CMakeList.txt and also manager/CMakeLists.txt and splines/CMakeLists.txt

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
…st empty, this means fewer if statements. Also removed the GPU setting for LOW_MEMORY_STUCTS as this isn't used
…e_gpu_compile_options

Pulling in from develop to get changes to README
@EdAtkin EdAtkin merged commit fef80f4 into develop Dec 10, 2024
12 checks passed
@EdAtkin EdAtkin deleted the feature_gpu_compile_options branch December 10, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmake Manager Nu Osc/Xsec Related with neutrino interactions or oscialtions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants