Skip to content

Commit

Permalink
python312Packages.tinygrad: patch cuda headers
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Oct 8, 2024
1 parent f0668c1 commit 38708ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/tinygrad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ buildPythonPackage rec {
substituteInPlace tinygrad/runtime/ops_clang.py \
--replace-fail "'clang'" "'${lib.getExe clang}'"
''
# `cuda_fp16.h` and co. are needed at runtime to compile kernels
+ lib.optionalString cudaSupport ''
substituteInPlace tinygrad/runtime/support/compiler_cuda.py \
--replace-fail "-I/opt/cuda/include/" "-I${lib.getDev cudaPackages.cuda_cudart}/include/"
''
+ lib.optionalString rocmSupport ''
substituteInPlace tinygrad/runtime/autogen/hip.py \
--replace-fail "/opt/rocm/lib/libamdhip64.so" "${rocmPackages.clr}/lib/libamdhip64.so" \
Expand Down

0 comments on commit 38708ae

Please sign in to comment.