Allow AMDGCN as a GPU offloading target for OpenMP during compiler
invocation and allow setting CUDAMode for it.
Originally authored by Greg Rodgers (@gregrodgers).
Differential D79754
[OpenMP][AMDGCN] Support OpenMP offloading for AMDGCN architecture - Part 1 saiislam on May 11 2020, 5:13 PM. Authored by
Details Allow AMDGCN as a GPU offloading target for OpenMP during compiler Originally authored by Greg Rodgers (@gregrodgers).
Diff Detail
Event TimelineComment Actions Test?
Comment Actions Moved isGPU() from llvm's Triple.h to clang's TargetInfo. Renamed it to isOpenMPGPU()
Comment Actions Removed isOpenMPGPU() to avoid defining OpenMP compatibility of an architecture.
Comment Actions Added test case to show treatment of specific functions as builtins or functions on the device
Comment Actions Shifted test cases in openmp-offload-gpu.c for better visual segmentation. Comment Actions I'm generally fine with this, don't wait for my approval.
|
This seems awkward to me. Why mix it up with only CUDA and HIP? The earlier factoring is better, where CUDA/HIP took care of their own business, and the catch-all case of AMDGCN was a separate clause by itself. It doesn't matter that the builtins being checked for AMDGCN on OpenMP are currently identical to CUDA/HIP. When this situation later changes (I am sure OpenMP will support more builtins), we will have to split it out again anyway.