Fix OpenMP Clang NVIDIA Target flags (missing sm architecture) with new NVARCH option
Example usage: make -f OpenMP.make COMPILER=CLANG TARGET=NVIDIA NVARCH=sm_61 Fixes #61
This commit is contained in:
parent
5a93022fc1
commit
ffa221fd35
@ -17,7 +17,8 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Update local copy of OpenCL C++ header file.
|
- Update local copy of OpenCL C++ header file.
|
||||||
- Ensure correct SYCL queue constructor with explicit async_handler.
|
- Ensure correct SYCL queue constructor with explicit async_handler.
|
||||||
- Use built in SYCL runtime device discovery.
|
- Use built in SYCL runtime device discovery.
|
||||||
- Cray compiler OpenMP flags updated
|
- Cray compiler OpenMP flags updated.
|
||||||
|
- Clang compiler OpenMP flags corrected for NVIDIA target.
|
||||||
- Reorder OpenCL objects in class so destructors are called in safe order.
|
- Reorder OpenCL objects in class so destructors are called in safe order.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|||||||
18
OpenMP.make
18
OpenMP.make
@ -23,6 +23,22 @@ $(info $(target_help))
|
|||||||
TARGET=CPU
|
TARGET=CPU
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ("$(COMPILER)", "CLANG")
|
||||||
|
ifdef TARGET
|
||||||
|
ifeq ("$(TARGET)", "NVIDIA")
|
||||||
|
ifndef NVARCH
|
||||||
|
define nvarch_help
|
||||||
|
Set NVARCH to select sm_?? version.
|
||||||
|
Default: sm_60
|
||||||
|
|
||||||
|
endef
|
||||||
|
$(info $(nvarch_help))
|
||||||
|
NVARCH=sm_60
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
COMPILER_ARMCLANG = armclang++
|
COMPILER_ARMCLANG = armclang++
|
||||||
COMPILER_GNU = g++
|
COMPILER_GNU = g++
|
||||||
COMPILER_GNU_PPC = g++
|
COMPILER_GNU_PPC = g++
|
||||||
@ -60,7 +76,7 @@ OMP_NEC_CPU = -fopenmp
|
|||||||
|
|
||||||
# OpenMP flags for NVIDIA
|
# OpenMP flags for NVIDIA
|
||||||
OMP_CRAY_NVIDIA = -DOMP_TARGET_GPU
|
OMP_CRAY_NVIDIA = -DOMP_TARGET_GPU
|
||||||
OMP_CLANG_NVIDIA = -DOMP_TARGET_GPU -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda
|
OMP_CLANG_NVIDIA = -DOMP_TARGET_GPU -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=$(NVARCH)
|
||||||
OMP_GNU_NVIDIA = -DOMP_TARGET_GPU -fopenmp -foffload=nvptx-none
|
OMP_GNU_NVIDIA = -DOMP_TARGET_GPU -fopenmp -foffload=nvptx-none
|
||||||
OMP_GNU_AMD = -DOMP_TARGET_GPU -fopenmp -foffload=amdgcn-amdhsa
|
OMP_GNU_AMD = -DOMP_TARGET_GPU -fopenmp -foffload=amdgcn-amdhsa
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user