Merge pull request #290059 from mweinelt/accelerate-cudatoolkit-optional
python311Packages.accelerate: make cudatoolkit usage conditional
This commit is contained in:
commit
b56485b679
1 changed files with 4 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
|||
, pyyaml
|
||||
, safetensors
|
||||
, torch
|
||||
, config
|
||||
, cudatoolkit
|
||||
, evaluate
|
||||
, parameterized
|
||||
|
@ -51,7 +52,7 @@ buildPythonPackage rec {
|
|||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export PATH=$out/bin:$PATH
|
||||
'' + lib.optionalString (lib.meta.availableOn stdenv.hostPlatform cudatoolkit) ''
|
||||
'' + lib.optionalString config.cudaSupport ''
|
||||
export TRITON_PTXAS_PATH="${cudatoolkit}/bin/ptxas"
|
||||
'';
|
||||
pytestFlagsArray = [ "tests" ];
|
||||
|
@ -75,7 +76,8 @@ buildPythonPackage rec {
|
|||
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
# usual aarch64-linux RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly
|
||||
"CheckpointTest"
|
||||
# requires ptxas from cudatoolkit, which is unavailable on aarch64-linux
|
||||
] ++ lib.optionals (!config.cudaSupport) [
|
||||
# requires ptxas from cudatoolkit, which is unfree
|
||||
"test_dynamo_extract_model"
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
# RuntimeError: torch_shm_manager: execl failed: Permission denied
|
||||
|
|
Loading…
Reference in a new issue