Fixes for enabling HIP unit tests. Includes a fix to make this work with the latest cmake.

This commit is contained in:
Rohit Santhanam 2021-12-12 21:03:30 +00:00 committed by Antonio Sánchez
parent c20e908ebc
commit 6b2df80317

View File

@ -28,9 +28,9 @@ macro(ei_add_test_internal testname testname_with_suffix)
set(is_gpu_test ON)
if(EIGEN_TEST_HIP)
hip_reset_flags()
hip_add_executable(${targetname} ${filename})
target_compile_definitions(${targetname} PRVIATE -DEIGEN_USE_HIP)
target_compile_options(${targetname} PRVIATE -std=c++14)
hip_add_executable(${targetname} ${filename} HIPCC_OPTIONS -std=c++14)
target_compile_definitions(${targetname} PRIVATE -DEIGEN_USE_HIP)
set_property(TARGET ${targetname} PROPERTY HIP_ARCHITECTURES gfx900 gfx906 gfx908 gfx90a gfx1030)
elseif(EIGEN_TEST_CUDA_CLANG)
set_source_files_properties(${filename} PROPERTIES LANGUAGE CXX)