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

add CMake presets #2203

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build/
/.settings/

# Visual Studio Code project files
.vscode/
.vscode

# Visual Studio project files
.vs/
Expand All @@ -57,3 +57,6 @@ jobs.yml
# pipenv files
Pipfile
Pipfile.lock

# user specific cmake preset settings
CMakeUserPresets.json
198 changes: 198 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 22,
"patch": 0
},
"configurePresets": [
{
"name": "develop",
"description": "enable tests and examples",
"hidden": true,
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"alpaka_BUILD_EXAMPLES": "ON",
"BUILD_TESTING": "ON"
}
},
{
"name": "cpu-serial",
"description": "enable serial back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON"
}
},
{
"name": "cpu-omp2b",
"description": "enable OpenMP 2 Grid Block back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE": "ON"
}
},
{
"name": "cpu-omp2t",
"description": "enable OpenMP 2 Block Thread back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE": "ON"
}
},
{
"name": "cpu-stdthreads",
"description": "enable std::thread back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE": "ON"
}
},
{
"name": "cpu-tbb",
"description": "enable Intel TBB back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_TBB_T_SEQ_ENABLE": "ON"
}
},
{
"name": "cpu-all",
"description": "enable all cpu back-ends (serial, OpenMP 2 Grid Block and Block Thread, std::thread and Intel TBB back-end",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE": "ON",
"alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE": "ON",
"alpaka_ACC_CPU_B_SEQ_T_THREADS_ENABLE": "ON",
"alpaka_ACC_CPU_B_TBB_T_SEQ_ENABLE": "ON"
}
},
{
"name": "gpu-hip",
"description": "use HIP back-end on AMD GPUs",
"inherits": "develop",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "hipcc",
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"alpaka_ACC_GPU_HIP_ENABLE": "ON"
}
},
{
"name": "gpu-sycl-intel",
"description": "use Sycl back-end on Intel GPUs",
"inherits": "develop",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "icpx",
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"alpaka_ACC_SYCL_ENABLE": "ON",
"alpaka_SYCL_ONEAPI_GPU": "ON",
"alpaka_SYCL_ONEAPI_GPU_DEVICES": "spir64"
}
},
{
"name": "gpu-cuda-nvcc",
"description": "use cuda back-end on Nvidia GPUs with nvcc device compiler",
"inherits": "develop",
"cacheVariables": {
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"alpaka_ACC_GPU_CUDA_ENABLE": "ON"
}
},
{
"name": "gpu-cuda-clang",
"description": "use cuda back-end on Nvidia GPUs with clang++ device compiler",
"inherits": "develop",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CUDA_COMPILER": "clang++",
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"alpaka_ACC_GPU_CUDA_ENABLE": "ON"
}
}
],
"buildPresets": [
{
"name": "cpu-serial",
"configurePreset": "cpu-serial"
},
{
"name": "cpu-omp2b",
"configurePreset": "cpu-omp2b"
},
{
"name": "cpu-omp2t",
"configurePreset": "cpu-omp2t"
},
{
"name": "cpu-stdthreads",
"configurePreset": "cpu-stdthreads"
},
{
"name": "cpu-tbb",
"configurePreset": "cpu-tbb"
},
{
"name": "cpu-all",
"configurePreset": "cpu-all"
},
{
"name": "gpu-hip",
"configurePreset": "gpu-hip"
},
{
"name": "gpu-sycl-intel",
"configurePreset": "gpu-sycl-intel"
},
{
"name": "gpu-cuda-nvcc",
"configurePreset": "gpu-cuda-nvcc"
},
{
"name": "gpu-cuda-clang",
"configurePreset": "gpu-cuda-clang"
}
],
"testPresets": [
{
"name": "cpu-serial",
"configurePreset": "cpu-serial"
},
{
"name": "cpu-omp2b",
"configurePreset": "cpu-omp2b"
},
{
"name": "cpu-omp2t",
"configurePreset": "cpu-omp2t"
},
{
"name": "cpu-stdthreads",
"configurePreset": "cpu-stdthreads"
},
{
"name": "cpu-tbb",
"configurePreset": "cpu-tbb"
},
{
"name": "cpu-all",
"configurePreset": "cpu-all"
},
{
"name": "gpu-hip",
"configurePreset": "gpu-hip"
},
{
"name": "gpu-sycl-intel",
"configurePreset": "gpu-sycl-intel"
},
{
"name": "gpu-cuda-nvcc",
"configurePreset": "gpu-cuda-nvcc"
},
{
"name": "gpu-cuda-clang",
"configurePreset": "gpu-cuda-clang"
}
]
}
Loading
Loading