Commit db5a8d78 authored by Konstantin Pyzhov's avatar Konstantin Pyzhov Committed by Brad King
Browse files

FindOpenMP: Add support for HIP clang device pass

The HIP clang makes 2 passes when compiling HIP programs: the DEVICE
pass and the HOST pass.  For openmp, the `-fopenmp` option is only
passed to the HOST compilation pass.  Therefore, the small test that
CMake uses for OpenMP detection fails to compile, and CMake reports
failure to detect OpenMP support in the compiler.  The suggested
solution is to add check for `__HIP_DEVICE_COMPILE__` macro defined by
HIP clang for the DEVICE pass to the OpenMP detection test.
parent 9150c818
......@@ -128,6 +128,8 @@ int main(void) {
#ifdef _OPENMP
return 0;
#elif defined(__HIP_DEVICE_COMPILE__)
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment