python3Packages.torch: Add 'tritonSupport' option

Guard this option against 'stdenv.isDarwin', which currently is unknown whether it works or not.
This commit is contained in:
Madoura
2023-11-17 16:43:45 +01:00
committed by Weijia Wang
parent da81784149
commit 534cc954e5
@@ -16,9 +16,10 @@
filelock,
jinja2,
networkx,
openai-triton,
sympy,
numpy, pyyaml, cffi, click, typing-extensions,
# ROCm build and `torch.compile` requires `openai-triton`
tritonSupport ? (!stdenv.isDarwin), openai-triton,
# Unit tests
hypothesis, psutil,
@@ -377,12 +378,10 @@ in buildPythonPackage rec {
# the following are required for tensorboard support
pillow six future tensorboard protobuf
# ROCm build and `torch.compile` requires openai-triton
openai-triton
# torch/csrc requires `pybind11` at runtime
pybind11
]
++ lib.optionals tritonSupport [ openai-triton ]
++ lib.optionals MPISupport [ mpi ]
++ lib.optionals rocmSupport [ rocmtoolkit_joined ];