Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions easybuild/easyblocks/p/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,20 @@ def add_enable_option(name, enabled):
# determine the compute capability of a GPU in the system and use that which may fail tests if
# it is to new for the used nvcc
env.setvar('TORCH_CUDA_ARCH_LIST', ';'.join(cuda_cc))
with_gpu_support = True
else:
# Disable CUDA
options.append('USE_CUDA=0')
with_gpu_support = False

if pytorch_version >= '2.0':
add_enable_option('USE_ROCM', get_software_root('ROCm'))
elif pytorch_version >= 'v1.10.0':
add_enable_option('USE_MAGMA', get_software_root('magma'))
has_rocm = get_software_root('ROCm')
add_enable_option('USE_ROCM', has_rocm)
if has_rocm:
with_gpu_support = True

if pytorch_version >= '1.10.0':
add_enable_option('USE_MAGMA', with_gpu_support and get_software_root('magma'))

if get_cpu_architecture() == POWER:
# *NNPACK is not supported on Power, disable to avoid warnings
Expand All @@ -525,7 +531,7 @@ def add_enable_option(name, enabled):
if pytorch_version >= '1.10.0' and pytorch_version < '1.12.0':
options.append('USE_BREAKPAD=0')
# FBGEMM requires AVX512, so not available on PPC
if pytorch_version >= 'v1.10.0':
if pytorch_version >= '1.10.0':
options.append('USE_FBGEMM=0')

# Metal only supported on IOS which likely doesn't work with EB, so disabled
Expand Down