@@ -42,7 +42,7 @@ if( BUILD_WITH_TENSILE )
4242 endif ( )
4343
4444 set ( Tensile_RUNTIME_LANGUAGE "HIP" )
45- message ( STATUS "AMDGPU_TARGETS =${AMDGPU_TARGETS } " )
45+ message ( STATUS "ROCBLAS_GPUS =${ROCBLAS_GPUS } " )
4646 if ( BUILD_WITH_TENSILE_HOST )
4747 #TODO update when this feature has been validated
4848 #set( PACKAGE_TENSILE_LIBRARY ON )
@@ -84,7 +84,7 @@ if( BUILD_WITH_TENSILE )
8484 # Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
8585 # "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
8686 # target_compile_options( Tensile PRIVATE -Wno-unused-command-line-argument -fno-gpu-rdc -Wno-deprecated-declarations)
87- foreach ( target ${AMDGPU_TARGETS } )
87+ foreach ( target ${ROCBLAS_GPUS } )
8888 if ( BUILD_WITH_TENSILE_HOST )
8989 # Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
9090 # "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
@@ -99,6 +99,16 @@ if( BUILD_WITH_TENSILE )
9999 endforeach ( )
100100 endif ( )
101101
102+ if ( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
103+ foreach ( target ${ROCBLAS_GPUS} )
104+ if ( BUILD_WITH_TENSILE_HOST )
105+ target_compile_options ( TensileHost PRIVATE --amdgpu-target =${target} )
106+ else ()
107+ target_compile_options ( Tensile PRIVATE --amdgpu-target =${target} )
108+ endif ()
109+ endforeach ( )
110+ endif ( )
111+
102112 if ( ROCBLAS_SHARED_LIBS )
103113 set ( BUILD_SHARED_LIBS ON )
104114 if ( BUILD_WITH_TENSILE_HOST )
@@ -326,8 +336,16 @@ if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
326336 # Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
327337 # "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
328338 target_compile_options ( rocblas PRIVATE -Wno-unused-command -line-argument -fno-gpu-rdc )
329- foreach ( target ${AMDGPU_TARGETS} )
339+ foreach ( target ${ROCBLAS_GPUS} )
340+ target_compile_options ( rocblas PRIVATE --amdgpu-target =${target} )
341+ endforeach ( )
342+ endif ( )
343+
344+ if ( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
345+ foreach ( target ${ROCBLAS_GPUS} )
346+ message ( STATUS "TARGET: " ${target} )
330347 target_compile_options ( rocblas PRIVATE --amdgpu-target =${target} )
348+ target_link_libraries ( rocblas PRIVATE --amdgpu-target =${target} )
331349 endforeach ( )
332350endif ( )
333351
0 commit comments