Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
NVVM: Don't use hardcoded version limits
The minimum toolkit version can be derived from the support matrix, and
the minimum CC for unrecognised toolkits can be derived from
`config.CUDA_DEFAULT_PTX_CC`, which can also be overridden by the user
if necessary - for example, if a user has a toolkit that in future has
dropped even support for 5.3.
  • Loading branch information
gmarkall committed Nov 14, 2022
commit 3e7ebb47d911d103845c55c7e3ed26dd6f9c7919
9 changes: 6 additions & 3 deletions numba/cuda/cudadrv/nvvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ def ccs_supported_by_ctk(ctk_version):
except KeyError:
# For unsupported CUDA toolkit versions, all we can do is assume all
# non-deprecated versions we are aware of are supported.
return tuple([cc for cc in COMPUTE_CAPABILITIES if cc >= (5, 3)])
return tuple([cc for cc in COMPUTE_CAPABILITIES
if cc >= config.CUDA_DEFAULT_PTX_CC])


def get_supported_ccs():
Expand All @@ -394,11 +395,13 @@ def get_supported_ccs():
return _supported_cc

# Ensure the minimum CTK version requirement is met
if cudart_version < (11, 0):
min_cudart = min(CTK_SUPPORTED)
if cudart_version < min_cudart:
_supported_cc = ()
ctk_ver = f"{cudart_version[0]}.{cudart_version[1]}"
unsupported_ver = (f"CUDA Toolkit {ctk_ver} is unsupported by Numba - "
"11.0 is the minimum required version.")
f"{min_cudart[0]}.{min_cudart[1]} is the minimum "
"required version.")
warnings.warn(unsupported_ver)
return _supported_cc

Expand Down