Repository: cupy/cupy

Issue:
[RFC] Deprecation Plans for v9
In CuPy v9, we are going to drop support for the following:

* Python 3.5
* NumPy 1.16
    * c.f. NEP29: https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table
* SciPy 1.3
* CUDA 9.0
    * CUDA 9.1 is already dropped in v8, so v9 will only support CUDA 9.2+

As for cuDNN and NCCL, we will only support the latest versions depending on the CUDA version:

* cuDNN: v9 supports v7.6.5 (for CUDA 9.2/10.x) & v8+ (for CUDA 10.1+)
* NCCL: v9 supports: v2.4.8 (CUDA 9.2 only), v2.6.4 (CUDA 10.0 only), v2.7.8+ (CUDA 10.1+)

See the following docs for the versions currently supported in v8 branch:
https://docs.cupy.dev/en/stable/install.html


Discussion:
ref: #3643, #3631, #2993

Resolving patch:
diff --git a/cupy_setup_build.py b/cupy_setup_build.py
--- a/cupy_setup_build.py
+++ b/cupy_setup_build.py
@@ -909,7 +909,7 @@ def _nvcc_gencode_options(cuda_version):
                          ('compute_70', 'sm_70'),
                          ('compute_75', 'sm_75'),
                          'compute_70']
-        elif cuda_version >= 9000:
+        elif cuda_version >= 9020:
             arch_list = ['compute_30',
                          'compute_50',
                          ('compute_60', 'sm_60'),
diff --git a/cupyx/tools/install_library.py b/cupyx/tools/install_library.py
--- a/cupyx/tools/install_library.py
+++ b/cupyx/tools/install_library.py
@@ -73,10 +73,6 @@ def _make_cudnn_record(
     '9.2', '7.6.5',
     'cudnn-9.2-linux-x64-v7.6.5.32.tgz',
     'cudnn-9.2-windows10-x64-v7.6.5.32.zip'))
-_cudnn_records.append(_make_cudnn_record(
-    '9.0', '7.6.5',
-    'cudnn-9.0-linux-x64-v7.6.5.32.tgz',
-    'cudnn-9.0-windows10-x64-v7.6.5.32.zip'))
 
 
 def install_cudnn(cuda, prefix):
diff --git a/install/build.py b/install/build.py
--- a/install/build.py
+++ b/install/build.py
@@ -14,8 +14,8 @@
 PLATFORM_LINUX = sys.platform.startswith('linux')
 PLATFORM_WIN32 = sys.platform.startswith('win32')
 
-minimum_cuda_version = 9000
-minimum_cudnn_version = 7000
+minimum_cuda_version = 9020
+minimum_cudnn_version = 7600
 maximum_cudnn_version = 8099
 
 minimum_hip_version = 305  # for ROCm 3.5.0+
@@ -312,7 +312,7 @@ def check_cuda_version(compiler, settings):
     if _cuda_version < minimum_cuda_version:
         utils.print_warning(
             'CUDA version is too old: %d' % _cuda_version,
-            'CUDA 9.0 or newer is required')
+            'CUDA 9.2 or newer is required')
         return False
 
     return True


Test patch:
diff --git a/tests/cupy_tests/core_tests/test_ndarray_reduction.py b/tests/cupy_tests/core_tests/test_ndarray_reduction.py
--- a/tests/cupy_tests/core_tests/test_ndarray_reduction.py
+++ b/tests/cupy_tests/core_tests/test_ndarray_reduction.py
@@ -324,13 +324,6 @@ def test_argmin_nan_imag(self, xp, dtype):
         return a.argmin()
 
 
-# TODO(leofang): remove this once CUDA 9.0 is dropped
-def _skip_cuda90(dtype):
-    ver = cupy.cuda.runtime.runtimeGetVersion()
-    if dtype == cupy.float16 and ver == 9000:
-        pytest.skip('CUB does not support fp16 on CUDA 9.0')
-
-
 # This class compares CUB results against NumPy's
 @testing.parameterize(*testing.product({
     'shape': [(10,), (10, 20), (10, 20, 30), (10, 20, 30, 40)],
@@ -359,7 +352,6 @@ def tearDown(self):
     @testing.for_all_dtypes(no_bool=True)
     @testing.numpy_cupy_allclose(rtol=1E-5)
     def test_cub_min(self, xp, dtype, axis):
-        _skip_cuda90(dtype)
         a = testing.shaped_random(self.shape, xp, dtype, order=self.order)
 
         if xp is numpy:
@@ -400,7 +392,6 @@ def test_cub_min_empty_axis(self, xp, dtype, contiguous_check=False):
     @testing.for_all_dtypes(no_bool=True)
     @testing.numpy_cupy_allclose(rtol=1E-5)
     def test_cub_max(self, xp, dtype, axis):
-        _skip_cuda90(dtype)
         a = testing.shaped_random(self.shape, xp, dtype, order=self.order)
 
         if xp is numpy: