[OpenMP] Add build flags for OpenMP offload to AMD and NVIDIA with GCC 10.1

Closes #65
This commit is contained in:
Tom Deakin 2020-05-12 11:24:29 +01:00
parent 87b126f5ea
commit b792c422f7
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- Compiler options for OpenMP GNU offloading to NVIDIA and AMD.
### Changed
- Use cl::sycl::id parameters instead of cl::sycl::item.
- Update local copy of OpenCL C++ header file.

View File

@ -14,7 +14,7 @@ ifndef TARGET
define target_help
Set TARGET to change device (defaulting to CPU).
Available targets are:
CPU NVIDIA
CPU NVIDIA AMD
endef
$(info $(target_help))
@ -51,6 +51,8 @@ OMP_NEC_CPU = -fopenmp
# OpenMP flags for NVIDIA
OMP_CRAY_NVIDIA = -DOMP_TARGET_GPU
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)
$(error Targeting $(TARGET) with $(COMPILER) not supported)