py-jaxlib: add conflict for missing cuda cuda_arch value (#39054)

* py-jaxlib: add conflict for missing cuda cuda_arch specification

* Update var/spack/repos/builtin/packages/py-jaxlib/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* py-jaxlib: conflict missing cuda_arch value when with cuda

* Update var/spack/repos/builtin/packages/py-jaxlib/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Christopher Christofi 2023-07-22 17:27:49 +01:00 committed by GitHub
parent 366c798b87
commit c811b71336
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,13 @@ class PyJaxlib(PythonPackage, CudaPackage):
depends_on("py-absl-py", when="@:0.3", type=("build", "run")) depends_on("py-absl-py", when="@:0.3", type=("build", "run"))
depends_on("py-flatbuffers@1.12:2", when="@0.1", type=("build", "run")) depends_on("py-flatbuffers@1.12:2", when="@0.1", type=("build", "run"))
conflicts(
"cuda_arch=none",
when="+cuda",
msg="Must specify CUDA compute capabilities of your GPU, see "
"https://developer.nvidia.com/cuda-gpus",
)
def patch(self): def patch(self):
self.tmp_path = tempfile.mkdtemp(prefix="spack") self.tmp_path = tempfile.mkdtemp(prefix="spack")
self.buildtmp = tempfile.mkdtemp(prefix="spack") self.buildtmp = tempfile.mkdtemp(prefix="spack")