[OpenMP] Add build flags for OpenMP offload to AMD and NVIDIA with GCC 10.1
Closes #65
This commit is contained in:
parent
87b126f5ea
commit
b792c422f7
@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Compiler options for OpenMP GNU offloading to NVIDIA and AMD.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Use cl::sycl::id parameters instead of cl::sycl::item.
|
- Use cl::sycl::id parameters instead of cl::sycl::item.
|
||||||
- Update local copy of OpenCL C++ header file.
|
- Update local copy of OpenCL C++ header file.
|
||||||
|
|||||||
@ -14,7 +14,7 @@ ifndef TARGET
|
|||||||
define target_help
|
define target_help
|
||||||
Set TARGET to change device (defaulting to CPU).
|
Set TARGET to change device (defaulting to CPU).
|
||||||
Available targets are:
|
Available targets are:
|
||||||
CPU NVIDIA
|
CPU NVIDIA AMD
|
||||||
|
|
||||||
endef
|
endef
|
||||||
$(info $(target_help))
|
$(info $(target_help))
|
||||||
@ -51,6 +51,8 @@ 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
|
||||||
|
OMP_GNU_NVIDIA = -DOMP_TARGET_GPU -fopenmp -foffload=nvptx-none
|
||||||
|
OMP_GNU_AMD = -DOMP_TARGET_GPU -fopenmp -foffload=amdgcn-amdhsa
|
||||||
|
|
||||||
ifndef OMP_$(COMPILER)_$(TARGET)
|
ifndef OMP_$(COMPILER)_$(TARGET)
|
||||||
$(error Targeting $(TARGET) with $(COMPILER) not supported)
|
$(error Targeting $(TARGET) with $(COMPILER) not supported)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user