mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
GPU: Raise CUDA/HIP minimum and remove legacy guards
- Raise CUDA minimum from 9.0 to 11.4 (sm_70/Volta).
- Raise HIP minimum to GFX906 (Vega 20/MI50) / ROCm 5.6.
- Remove EIGEN_HAS_{CUDA,HIP,GPU}_FP16 guards — FP16 is always available
on sm_70+ and GFX906+.
- Remove obsolete __HIP_ARCH_HAS_* preprocessor branches.
- C++14 cleanup: remove pre-C++14 workarounds in GPU code.
- Fix NVCC warnings (deprecated register keyword, unreachable code,
tautological comparisons).
- Fix HIP test execution on gfx1151.
- Update CI configuration for new minimum versions.
This commit is contained in:
@@ -8,6 +8,12 @@ macro(ei_add_property prop value)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(EIGEN_TEST_HIP AND NOT DEFINED EIGEN_HIP_ARCHITECTURES)
|
||||
set(EIGEN_HIP_ARCHITECTURES
|
||||
gfx900;gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151
|
||||
CACHE STRING "HIP GPU architectures to build Eigen's HIP tests for.")
|
||||
endif()
|
||||
|
||||
#internal. See documentation of ei_add_test for details.
|
||||
macro(ei_add_test_internal testname testname_with_suffix)
|
||||
set(targetname ${testname_with_suffix})
|
||||
@@ -30,7 +36,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
hip_reset_flags()
|
||||
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 gfx940 gfx941 gfx942 gfx1030)
|
||||
set_property(TARGET ${targetname} PROPERTY HIP_ARCHITECTURES "${EIGEN_HIP_ARCHITECTURES}")
|
||||
elseif(EIGEN_TEST_CUDA_CLANG)
|
||||
set_source_files_properties(${filename} PROPERTIES LANGUAGE CXX)
|
||||
|
||||
@@ -134,6 +140,7 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
if (is_gpu_test)
|
||||
# Add gpu tag for testing only GPU tests.
|
||||
set_property(TEST ${testname_with_suffix} APPEND PROPERTY LABELS "gpu")
|
||||
set_property(TEST ${testname_with_suffix} PROPERTY SKIP_RETURN_CODE 77)
|
||||
endif()
|
||||
|
||||
if(EIGEN_SYCL)
|
||||
|
||||
Reference in New Issue
Block a user