summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-03-18 15:05:03 +0100
committerEli Schwartz <eschwartz93@gmail.com>2023-03-19 08:31:28 -0400
commit5feeb1c2ef243176c9e064f08f0617251399d456 (patch)
tree6884426d24e86326d277aff8dbad1725dc9f7df5
parent193a12e3668236ef17c107362bf973c781069c29 (diff)
downloadmeson-5feeb1c2ef243176c9e064f08f0617251399d456.tar.gz
CUDA: make "Ampere" equivalent to SM8.0+SM8.6
-rw-r--r--mesonbuild/modules/cuda.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/modules/cuda.py b/mesonbuild/modules/cuda.py
index 72ca30643..6f809cb34 100644
--- a/mesonbuild/modules/cuda.py
+++ b/mesonbuild/modules/cuda.py
@@ -237,6 +237,10 @@ class CudaModule(NewExtensionModule):
cuda_common_gpu_architectures += ['7.5+PTX'] # noqa: E221
cuda_hi_limit_gpu_architecture = '8.0' # noqa: E221
+ # need to account for the fact that Ampere is commonly assumed to include
+ # SM8.0 and SM8.6 even though CUDA 11.0 doesn't support SM8.6
+ cuda_ampere_bin = ['8.0']
+ cuda_ampere_ptx = ['8.0']
if version_compare(cuda_version, '>=11.0'):
cuda_known_gpu_architectures += ['Ampere'] # noqa: E221
cuda_common_gpu_architectures += ['8.0'] # noqa: E221
@@ -249,6 +253,9 @@ class CudaModule(NewExtensionModule):
cuda_hi_limit_gpu_architecture = '8.6' # noqa: E221
if version_compare(cuda_version, '>=11.1'):
+ cuda_ampere_bin += ['8.6'] # noqa: E221
+ cuda_ampere_ptx = ['8.6'] # noqa: E221
+
cuda_common_gpu_architectures += ['8.6'] # noqa: E221
cuda_all_gpu_architectures += ['8.6'] # noqa: E221
@@ -320,7 +327,7 @@ class CudaModule(NewExtensionModule):
'Volta': (['7.0'], ['7.0']),
'Xavier': (['7.2'], []),
'Turing': (['7.5'], ['7.5']),
- 'Ampere': (['8.0'], ['8.0']),
+ 'Ampere': (cuda_ampere_bin, cuda_ampere_ptx),
'Orin': (['8.7'], []),
'Lovelace': (['8.9'], ['8.9']),
'Hopper': (['9.0'], ['9.0']),