Loading pkgs/development/python-modules/tinygrad/default.nix +13 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ torch, tqdm, transformers, tinygrad, }: buildPythonPackage rec { Loading Loading @@ -92,7 +94,13 @@ buildPythonPackage rec { # pyobjc-framework-metal ]; pythonImportsCheck = [ "tinygrad" ]; pythonImportsCheck = [ "tinygrad" ] ++ lib.optionals cudaSupport [ "tinygrad.runtime.ops_nv" ]; nativeCheckInputs = [ blobfile Loading Loading @@ -175,6 +183,10 @@ buildPythonPackage rec { "extra/" ]; passthru.tests = { withCuda = tinygrad.override { cudaSupport = true; }; }; meta = { description = "Simple and powerful neural network framework"; homepage = "https://github.com/tinygrad/tinygrad"; Loading pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ index 6af74187..c5a6c6c4 100644 + pass +if libnvrtc is None: + raise RuntimeError(f"`libnvrtc.so` not found") +_libraries['libnvrtc.so'] = ctypes.CDLL(libnvrtc) +_libraries['libnvrtc.so'] = libnvrtc def string_cast(char_pointer, encoding='utf-8', errors='strict'): value = ctypes.cast(char_pointer, ctypes.c_char_p).value if value is not None and encoding is not None: Loading
pkgs/development/python-modules/tinygrad/default.nix +13 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ torch, tqdm, transformers, tinygrad, }: buildPythonPackage rec { Loading Loading @@ -92,7 +94,13 @@ buildPythonPackage rec { # pyobjc-framework-metal ]; pythonImportsCheck = [ "tinygrad" ]; pythonImportsCheck = [ "tinygrad" ] ++ lib.optionals cudaSupport [ "tinygrad.runtime.ops_nv" ]; nativeCheckInputs = [ blobfile Loading Loading @@ -175,6 +183,10 @@ buildPythonPackage rec { "extra/" ]; passthru.tests = { withCuda = tinygrad.override { cudaSupport = true; }; }; meta = { description = "Simple and powerful neural network framework"; homepage = "https://github.com/tinygrad/tinygrad"; Loading
pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ index 6af74187..c5a6c6c4 100644 + pass +if libnvrtc is None: + raise RuntimeError(f"`libnvrtc.so` not found") +_libraries['libnvrtc.so'] = ctypes.CDLL(libnvrtc) +_libraries['libnvrtc.so'] = libnvrtc def string_cast(char_pointer, encoding='utf-8', errors='strict'): value = ctypes.cast(char_pointer, ctypes.c_char_p).value if value is not None and encoding is not None: