Skip to content

[CMake] Introduce QMC_GPU cmake option#5267

Merged
prckent merged 7 commits into
QMCPACK:developfrom
ye-luo:cmake-qmc-gpu
Jan 8, 2025
Merged

[CMake] Introduce QMC_GPU cmake option#5267
prckent merged 7 commits into
QMCPACK:developfrom
ye-luo:cmake-qmc-gpu

Conversation

@ye-luo
Copy link
Copy Markdown
Contributor

@ye-luo ye-luo commented Jan 2, 2025

Proposed changes

Replace ENABLE_CUDA, ENABLE_ROCM, QMC_CUDA2HIP, ENABLE_SYCL and ENABLE_OFFLOAD CMake options with a single user facing option QMC_GPU proposed in #5250

    QMC_GPU               Semicolon-separated list of GPU features to build (openmp,cuda,hip,sycl).
                          "openmp", "cuda", "hip" and "sycl" for GPU acceleration via OpenMP offload, CUDA, HIP and SYCL.
                          Recommended values: "openmp;cuda" for NVIDIA, "openmp;hip" for AMD, "openmp;sycl" for Intel.
                          Its default value is set to the recommended value if QMC_GPU_ARCHS indicates a specific vendor
                          or left empty otherwise.
    QMC_GPU_ARCHS         Specify GPU architectures. For example, "gfx90a" targets AMD MI200 series GPUs.
                          "intel_gpu_pvc" targets Intel Data Center GPU Max 1xxx.
                          "sm_80;sm_70" creates a single executable running on both NVIDIA A100 and V100 GPUs.
                          Mixing vendor "gfx90a;sm_70" is not supported. If not set, atempt to derive it
                          from CMAKE_CUDA_ARCHITECTURES or CMAKE_HIP_ARCHITECTURES if available and then
                          atempt to auto-detect existing GPUs.

What type(s) of changes does this code introduce?

  • Build related changes

Does this introduce a breaking change?

  • yes

What systems has this change been tested on?

epyc-server

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

@ye-luo
Copy link
Copy Markdown
Contributor Author

ye-luo commented Jan 2, 2025

Test this please

@ye-luo ye-luo marked this pull request as draft January 2, 2025 22:51
@ye-luo ye-luo changed the title Introduce QMC_GPU Introduce QMC_GPU cmake option Jan 2, 2025
@ye-luo ye-luo changed the title Introduce QMC_GPU cmake option [CMake] Introduce QMC_GPU cmake option Jan 3, 2025
ye-luo added 2 commits January 7, 2025 08:17
Concentrate user facing CMake options to QMC_GPU.
@ye-luo ye-luo marked this pull request as ready for review January 7, 2025 14:40
Copy link
Copy Markdown
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Thanks Ye.

While updating these config options, can you document USE_OBJECT_TARGET ? It is only mentioned in the CMakeLists.txt

Once this is in and working we should review and update the recipes in config/ to use QMC_GPU.

@ye-luo
Copy link
Copy Markdown
Contributor Author

ye-luo commented Jan 7, 2025

@prckent USE_OBJECT_TARGET has been documented. I also added auto setting QMC_GPU based on QMC_GPU_ARCHS.

@prckent
Copy link
Copy Markdown
Contributor

prckent commented Jan 7, 2025

@prckent
Copy link
Copy Markdown
Contributor

prckent commented Jan 7, 2025

Test this please

@prckent prckent enabled auto-merge January 7, 2025 22:56
@prckent prckent disabled auto-merge January 7, 2025 22:57
@prckent
Copy link
Copy Markdown
Contributor

prckent commented Jan 7, 2025

Test this please

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