Commit ddc72341 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.tinygrad: add optional-dependencies

- update nativeCheckInputs
parent 1e687cd8
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -9,14 +9,17 @@
  rocmSupport ? config.rocmSupport,
  cudaPackages,
  ocl-icd,
  stdenv,
  rocmPackages,
  stdenv,

  # build-system
  setuptools,

  # dependencies
  llvmlite,
  numpy,
  triton,
  unicorn,

  # tests
  blobfile,
@@ -25,9 +28,9 @@
  hexdump,
  hypothesis,
  librosa,
  networkx,
  onnx,
  pillow,
  pydot,
  pytest-xdist,
  pytestCheckHook,
  safetensors,
@@ -101,6 +104,12 @@ buildPythonPackage rec {
      # pyobjc-framework-metal
    ];

  optional-dependencies = {
    llvm = [ llvmlite ];
    arm = [ unicorn ];
    triton = [ triton ];
  };

  pythonImportsCheck =
    [
      "tinygrad"
@@ -116,9 +125,9 @@ buildPythonPackage rec {
    hexdump
    hypothesis
    librosa
    networkx
    onnx
    pillow
    pydot
    pytest-xdist
    pytestCheckHook
    safetensors
@@ -127,7 +136,7 @@ buildPythonPackage rec {
    torch
    tqdm
    transformers
  ];
  ] ++ networkx.optional-dependencies.extra;

  preCheck = ''
    export HOME=$(mktemp -d)