File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
transformer_engine/common Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -395,13 +395,23 @@ else()
395395 else ()
396396 set (ROCSHMEM_HOME "/opt/rocm" CACHE STRING "Location of ROCSHMEM installation (default)" )
397397 endif ()
398+ set (ROCSHMEM_LIBRARY_PATH "${ROCSHMEM_HOME} /lib/librocshmem.a" )
399+ if (EXISTS ${ROCSHMEM_LIBRARY_PATH} )
400+ add_library (rocshmem STATIC IMPORTED )
401+ set_target_properties (rocshmem PROPERTIES
402+ IMPORTED_LOCATION "${ROCSHMEM_LIBRARY_PATH} "
403+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
404+ )
405+ else ()
406+ message (FATAL_ERROR "ROCSHMEM library not found at ${ROCSHMEM_LIBRARY_PATH} . PLease set ROCSHMEM_HOME." )
407+ endif ()
398408 target_link_options (transformer_engine PRIVATE
399409 -fgpu-rdc
400410 )
401411 target_link_libraries (transformer_engine PUBLIC
402412 -Wl,--whole-archive
403413 rocshmemapi
404- " ${ROCSHMEM_HOME} /lib/librocshmem.a"
414+ rocshmem
405415 -Wl,--no -whole-archive
406416 )
407417 endif ()
You can’t perform that action at this time.
0 commit comments