From ab197abf7c94957fdfd50e587bf5984f8bb5af92 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Tue, 19 Mar 2024 23:26:44 -0500 Subject: [PATCH] Adds LLVM native preset for GPU auto-detect --- CMakePresets.json | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 1387ebb41e3..d292a8cf427 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -25,7 +25,7 @@ "inherits": ["unity"], "cacheVariables": { "CMAKE_C_COMPILER": "mpicc", - "CMAKE_CXX_COMPILER": "mpic++" + "CMAKE_CXX_COMPILER": "mpicxx" }, "environment": { "INTEL_CXX_FLAGS": "-fiopenmp" @@ -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"], @@ -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" @@ -100,7 +117,7 @@ "displayName": "LLVM Clang A100", "cacheVariables": { "CMAKE_C_COMPILER": "mpicc", - "CMAKE_CXX_COMPILER": "mpic++" + "CMAKE_CXX_COMPILER": "mpicxx" } }, {