CUDA: Bugfix to architectural limit checks.

The upper bound on the CUDA Compute Capability is not always known.
Avoid checking cuda_hi_limit_gpu_architecture if it remains undefined.
pull/11116/head
Olexa Bilaniuk 2 years ago committed by Eli Schwartz
parent c4f3589215
commit 5b5798310a
  1. 4
      mesonbuild/modules/cuda.py

@ -337,7 +337,7 @@ class CudaModule(NewExtensionModule):
if version_compare(arch, '<' + cuda_lo_limit_gpu_architecture):
continue
if version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture):
if cuda_hi_limit_gpu_architecture and version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture):
continue
if codev:
@ -359,7 +359,7 @@ class CudaModule(NewExtensionModule):
if version_compare(arch, '<' + cuda_lo_limit_gpu_architecture):
continue
if version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture):
if cuda_hi_limit_gpu_architecture and version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture):
continue
arch = arch.replace('.', '')

Loading…
Cancel
Save