Skip to content

Commit 6fedb78

Browse files
authored
[python][amd] Check backend path for libamdhip64.so (#6598)
At Meta, we want to distribute libamdhip64.so alongside the AMD backend, similar to how we already distribute ptxas and ld.lld.
1 parent fbfa627 commit 6fedb78

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

third_party/amd/backend/driver.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ def _get_path_to_hip_runtime_dylib():
8181

8282
paths = []
8383

84+
# Check backend
85+
local_lib = os.path.join(os.path.dirname(__file__), "lib", lib_name)
86+
if os.path.exists(local_lib):
87+
return local_lib
88+
paths.append(local_lib)
89+
8490
import site
8591
# First search the HIP runtime dynamic library packaged with PyTorch. It's very likely
8692
# that we run Triton together with PyTorch. This makes sure we use the same dynamic

0 commit comments

Comments
 (0)