py-torch: Add a breakpad variant, disable it for ppc64 and ppc64le (#26990)

This commit is contained in:
Baptiste Jonglez 2021-10-29 20:00:48 +02:00 committed by GitHub
parent 3eb52b48b8
commit b8bc030a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ class PyTorch(PythonPackage, CudaPackage):
variant('gloo', default=not is_darwin, description='Use Gloo')
variant('tensorpipe', default=not is_darwin, description='Use TensorPipe')
variant('onnx_ml', default=True, description='Enable traditional ONNX ML API')
variant('breakpad', default=True, description='Enable breakpad crash dump library')
conflicts('+cuda', when='+rocm')
conflicts('+cudnn', when='~cuda')
@ -98,6 +99,9 @@ class PyTorch(PythonPackage, CudaPackage):
conflicts('+fbgemm', when='@:0.4,1.4.0')
conflicts('+qnnpack', when='@:0.4')
conflicts('+mkldnn', when='@:0.4')
conflicts('+breakpad', when='@:1.9') # Option appeared in 1.10.0
conflicts('+breakpad', when='target=ppc64:', msg='Unsupported')
conflicts('+breakpad', when='target=ppc64le:', msg='Unsupported')
conflicts('cuda_arch=none', when='+cuda',
msg='Must specify CUDA compute capabilities of your GPU, see '
@ -312,6 +316,8 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False):
enable_or_disable('kineto')
enable_or_disable('magma')
enable_or_disable('metal')
if self.spec.satisfies('@1.10:'):
enable_or_disable('breakpad')
enable_or_disable('nccl')
if '+nccl' in self.spec: