Skip to content

Commit

Permalink
Merge pull request #51 from exasmr/llvm_native
Browse files Browse the repository at this point in the history
Adds LLVM native preset for GPU auto-detect
  • Loading branch information
paulromano authored Mar 21, 2024
2 parents 5aebf75 + ab197ab commit 85ccd37
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"inherits": ["unity"],
"cacheVariables": {
"CMAKE_C_COMPILER": "mpicc",
"CMAKE_CXX_COMPILER": "mpic++"
"CMAKE_CXX_COMPILER": "mpicxx"
},
"environment": {
"INTEL_CXX_FLAGS": "-fiopenmp"
Expand Down Expand Up @@ -66,6 +66,23 @@
"PRESET_CXX_FLAGS": "-fopenmp-targets=spir64_gen -Xopenmp-target-backend \"-device 12.60.7\""
}
},
{
"name": "llvm_native",
"inherits": ["llvm"],
"displayName": "LLVM native GPU (whatever is detected on this node)",
"environment": {
"PRESET_CXX_FLAGS": "--offload-arch=native"
}
},
{
"name": "llvm_native_mpi",
"inherits": ["llvm_native"],
"displayName": "LLVM native GPU (whatever is detected on this node) with MPI",
"cacheVariables": {
"CMAKE_C_COMPILER": "mpicc",
"CMAKE_CXX_COMPILER": "mpicxx"
}
},
{
"name": "llvm_v100",
"inherits": ["llvm"],
Expand All @@ -80,7 +97,7 @@
"displayName": "LLVM Clang A100",
"cacheVariables": {
"CMAKE_C_COMPILER": "mpicc",
"CMAKE_CXX_COMPILER": "mpic++"
"CMAKE_CXX_COMPILER": "mpicxx"
},
"environment": {
"PRESET_CXX_FLAGS": "-fopenmp-targets=nvptx64 -Xopenmp-target -march=sm_70"
Expand All @@ -100,7 +117,7 @@
"displayName": "LLVM Clang A100",
"cacheVariables": {
"CMAKE_C_COMPILER": "mpicc",
"CMAKE_CXX_COMPILER": "mpic++"
"CMAKE_CXX_COMPILER": "mpicxx"
}
},
{
Expand Down

0 comments on commit 85ccd37

Please sign in to comment.