Fix(critical): Add rsmi_init shim to satisfy PyTorch linker dependencies when SMI is disabled
Tento commit je obsažen v:
@@ -793,6 +793,12 @@ if(ENABLE_AMDSMI)
|
||||
else()
|
||||
list(APPEND SRC_FILES src/misc/rocm_smi_wrap.cc)
|
||||
endif()
|
||||
else()
|
||||
# When SMI is disabled, compile the shim to provide dummy symbols (rsmi_init)
|
||||
# This satisfies external dependencies (like PyTorch) that expect SMI symbols
|
||||
# to be present, preventing them from failing to load or trying to load
|
||||
# the broken system library.
|
||||
list(APPEND SRC_FILES src/misc/smi_shim.cc)
|
||||
endif()
|
||||
list(APPEND SRC_FILES ${SMI_SOURCES})
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" {
|
||||
// Dummy implementation of rsmi_init to satisfy linker dependencies
|
||||
// when the real ROCm SMI library is broken or causes Bus Errors (gfx1151).
|
||||
// Returns 0 (RSMI_STATUS_SUCCESS).
|
||||
int rsmi_init(uint64_t flags) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele