cudnn: adjust version dependency on CUDA (#31763)
This commit is contained in:
parent
86be4666fc
commit
67154a1088
@ -250,9 +250,11 @@ class Cudnn(Package):
|
|||||||
if pkg:
|
if pkg:
|
||||||
version(long_ver, sha256=pkg)
|
version(long_ver, sha256=pkg)
|
||||||
# Add constraints matching CUDA version to cuDNN version
|
# Add constraints matching CUDA version to cuDNN version
|
||||||
cuda_req = "cuda@{0}.0:{0}".format(cuda_ver)
|
# cuDNN builds for CUDA 11.x are compatible with all CUDA 11.x:
|
||||||
cudnn_ver_req = "@{0}".format(long_ver)
|
# https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html#fntarg_2
|
||||||
depends_on(cuda_req, when=cudnn_ver_req)
|
if Version(cuda_ver) >= Version("11"):
|
||||||
|
cuda_ver = Version(cuda_ver).up_to(1)
|
||||||
|
depends_on("cuda@{}".format(cuda_ver), when="@{}".format(long_ver))
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
# Get the system and machine arch for building the file path
|
# Get the system and machine arch for building the file path
|
||||||
|
Loading…
Reference in New Issue
Block a user