py-torch-nvidia-apex: ~cuda does not build (#32939)
This commit is contained in:
parent
4ed963dda1
commit
d956da95c3
@ -25,6 +25,9 @@ class PyTorchNvidiaApex(PythonPackage, CudaPackage):
|
|||||||
|
|
||||||
variant("cuda", default=True, description="Build with CUDA")
|
variant("cuda", default=True, description="Build with CUDA")
|
||||||
|
|
||||||
|
# https://github.com/NVIDIA/apex/issues/1498
|
||||||
|
conflicts("~cuda")
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
if "+cuda" in self.spec:
|
if "+cuda" in self.spec:
|
||||||
env.set("CUDA_HOME", self.spec["cuda"].prefix)
|
env.set("CUDA_HOME", self.spec["cuda"].prefix)
|
||||||
@ -35,7 +38,7 @@ def setup_build_environment(self, env):
|
|||||||
)
|
)
|
||||||
env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch)
|
env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch)
|
||||||
|
|
||||||
def install_options(self, spec, prefix):
|
def global_options(self, spec, prefix):
|
||||||
args = []
|
args = []
|
||||||
if spec.satisfies("^py-torch@1.0:"):
|
if spec.satisfies("^py-torch@1.0:"):
|
||||||
args.append("--cpp_ext")
|
args.append("--cpp_ext")
|
||||||
|
Loading…
Reference in New Issue
Block a user