Skip to content

Commit ef27bba

Browse files
authored
Update RoCM substitutions for tinygrad (#367501)
2 parents de18642 + d1d640e commit ef27bba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,16 @@ 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}/"
90+
91+
substituteInPlace tinygrad/runtime/support/compiler_hip.py \
92+
--replace-fail "/opt/rocm/include" "${rocmPackages.clr}/include"
93+
94+
substituteInPlace tinygrad/runtime/support/compiler_hip.py \
95+
--replace-fail "/opt/rocm/llvm" "${rocmPackages.llvm.llvm}"
9196
9297
substituteInPlace tinygrad/runtime/autogen/comgr.py \
93-
--replace-fail "/opt/rocm/lib/libamd_comgr.so" "${rocmPackages.rocm-comgr}/lib/libamd_comgr.so"
98+
--replace-fail "/opt/rocm/" "${rocmPackages.rocm-comgr}/"
9499
'';
95100

96101
build-system = [ setuptools ];

0 commit comments

Comments
 (0)