blob: 76947f3f3bb9a89db17c2e004ac1718aadab914e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
USE_ROCM=ON USE_DISTRIBUTED=ON: fix *runtime* error: undefined symbol: rsmi_init
Upstream bug: https://github.com/pytorch/pytorch/issues/158725
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -1098,6 +1098,12 @@ if(USE_ROCM)
)
endif()
+ if(USE_DISTRIBUTED)
+ list(APPEND Caffe2_PUBLIC_HIP_DEPENDENCY_LIBS
+ rocm_smi64
+ )
+ endif()
+
# ---[ Kernel asserts
# Kernel asserts is disabled for ROCm by default.
# It can be turned on by turning on the env USE_ROCM_KERNEL_ASSERT to the build system.
--- a/cmake/public/LoadHIP.cmake
+++ b/cmake/public/LoadHIP.cmake
@@ -170,6 +170,7 @@ if(HIP_FOUND)
find_package_and_print_version(rocthrust REQUIRED)
find_package_and_print_version(hipsolver REQUIRED)
find_package_and_print_version(rocsolver REQUIRED)
+ find_package_and_print_version(rocm_smi REQUIRED)
find_package_and_print_version(rocshmem)
# workaround cmake 4 build issue
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
|