Skip to content

Commit 2877041

Browse files
authored
Update RoCM substitutions for tinygrad
AMD replaced their hardcoded `/opt/rocm/lib` paths with `ROCM_PATH, '/opt/rocm/'` variables, the old `substituteInPlace` no longer matched the strings and did the substitutions resulting in the libraries not being found at runtime.
1 parent eaa55af commit 2877041

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkgs/development/python-modules/tinygrad/default.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ buildPythonPackage rec {
8686
''
8787
+ lib.optionalString rocmSupport ''
8888
substituteInPlace tinygrad/runtime/autogen/hip.py \
89-
--replace-fail "/opt/rocm/lib/libamdhip64.so" "${rocmPackages.clr}/lib/libamdhip64.so" \
90-
--replace-fail "/opt/rocm/lib/libhiprtc.so" "${rocmPackages.clr}/lib/libhiprtc.so" \
89+
--replace-fail "/opt/rocm/" "${rocmPackages.clr}/"
9190
9291
substituteInPlace tinygrad/runtime/autogen/comgr.py \
93-
--replace-fail "/opt/rocm/lib/libamd_comgr.so" "${rocmPackages.rocm-comgr}/lib/libamd_comgr.so"
92+
--replace-fail "/opt/rocm/" "${rocmPackages.rocm-comgr}/"
9493
'';
9594

9695
build-system = [ setuptools ];

0 commit comments

Comments
 (0)