From 2e9697fba26deec23a06df941c19b89ed65cc789 Mon Sep 17 00:00:00 2001 From: Ben Frederickson Date: Tue, 6 Jul 2021 15:32:07 -0700 Subject: [PATCH 1/2] Fix building on cuda 11.4 Fix building on cuda 11.4 by allowing looking up the pxi directory just on cuda major versions, rather than whitelisting for each specific minor version of cuda 11. --- python/setup.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/python/setup.py b/python/setup.py index 2663119ca..3a59f6fe6 100644 --- a/python/setup.py +++ b/python/setup.py @@ -75,19 +75,22 @@ def get_cuda_version_from_header(cuda_include_dir): cuda_version_to_pxi_dir = { "10.1": "10.1", "10.2": "10.2", - "11.0": "11.x", - "11.1": "11.x", - "11.2": "11.x", - "11.3": "11.x", + "11": "11.x", } for pxd_basename in files_to_preprocess: pxi_basename = os.path.splitext(pxd_basename)[0] + ".pxi" - if CUDA_VERSION in cuda_version_to_pxi_dir: + pxi_dir = cuda_version_to_pxi_dir.get(CUDA_VERSION) + if not pxi_dir: + # didn't get an exact match on major.minor version - see if + # we have a match on just the major version + pxi_dir = cuda_version_to_pxi_dir.get(CUDA_VERSION.split(".")[0]) + + if pxi_dir: pxi_pathname = os.path.join( cwd, "rmm/_cuda", - cuda_version_to_pxi_dir[CUDA_VERSION], + pxi_dir, pxi_basename, ) pxd_pathname = os.path.join(cwd, "rmm/_cuda", pxd_basename) From ed813f041125ae45b578695cd8c3760d3a545762 Mon Sep 17 00:00:00 2001 From: Ben Frederickson Date: Tue, 6 Jul 2021 19:23:56 -0700 Subject: [PATCH 2/2] Code formatting --- python/setup.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python/setup.py b/python/setup.py index 3a59f6fe6..b6fd46af4 100644 --- a/python/setup.py +++ b/python/setup.py @@ -87,12 +87,7 @@ def get_cuda_version_from_header(cuda_include_dir): pxi_dir = cuda_version_to_pxi_dir.get(CUDA_VERSION.split(".")[0]) if pxi_dir: - pxi_pathname = os.path.join( - cwd, - "rmm/_cuda", - pxi_dir, - pxi_basename, - ) + pxi_pathname = os.path.join(cwd, "rmm/_cuda", pxi_dir, pxi_basename,) pxd_pathname = os.path.join(cwd, "rmm/_cuda", pxd_basename) try: if filecmp.cmp(pxi_pathname, pxd_pathname):