Skip to content

Commit

Permalink
Update RoCM substitutions for tinygrad (NixOS#367501)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Dec 23, 2024
2 parents de18642 + d1d640e commit ef27bba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/development/python-modules/tinygrad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,16 @@ buildPythonPackage rec {
''
+ lib.optionalString rocmSupport ''
substituteInPlace tinygrad/runtime/autogen/hip.py \
--replace-fail "/opt/rocm/lib/libamdhip64.so" "${rocmPackages.clr}/lib/libamdhip64.so" \
--replace-fail "/opt/rocm/lib/libhiprtc.so" "${rocmPackages.clr}/lib/libhiprtc.so" \
--replace-fail "/opt/rocm/" "${rocmPackages.clr}/"
substituteInPlace tinygrad/runtime/support/compiler_hip.py \
--replace-fail "/opt/rocm/include" "${rocmPackages.clr}/include"
substituteInPlace tinygrad/runtime/support/compiler_hip.py \
--replace-fail "/opt/rocm/llvm" "${rocmPackages.llvm.llvm}"
substituteInPlace tinygrad/runtime/autogen/comgr.py \
--replace-fail "/opt/rocm/lib/libamd_comgr.so" "${rocmPackages.rocm-comgr}/lib/libamd_comgr.so"
--replace-fail "/opt/rocm/" "${rocmPackages.rocm-comgr}/"
'';

build-system = [ setuptools ];
Expand Down

0 comments on commit ef27bba

Please sign in to comment.