Repository: cupy/cupy
Pull request: Update upgrade guide
Closes #5766
Refs #5818 (keeping this issue open as this PR is not covering all changes in v10)

Auto-backport to v9 should fail, I'll take care of it.

Problem statement:
Issue about the API of NCCL

Hi,

It seems that the API of NCCL described in the document, like `cupy.cuda.nccl`, is not working in the latest Cupy. It will throw an import error saying `cupy.cuda `does not have `nccl`. After checking the source code, I found a workaround is to `import cupy_backends `, then change all the `cupy.cuda.nccl...` to `cupy_backends.cuda.libs.nccl`. Is this expected? or I misused something?

Hints from issue discussion:
`cupy.cuda.nccl` should be alive as an alias to `cupy_backends.cuda.libs.nccl` even in the latest CuPy. I suspect your environment is in a mess because of some reason. Would you try to reinstall CuPy and see if it works?
Starting in CuPy v9, you need to do `import cupy.cuda.nccl` instead of `import cupy.cuda` explicitly.
This is something we should have covered in the upgrade guide... https://docs.cupy.dev/en/latest/upgrade.html#cupy-v9 (https://github.com/cupy/cupy/pull/4919)

Commit message: update upgrade guide

Patch to review:
diff --git a/docs/source/upgrade.rst b/docs/source/upgrade.rst
index 6cc5fb6d508..f3dd4dcad2d 100644
--- a/docs/source/upgrade.rst
+++ b/docs/source/upgrade.rst
@@ -7,17 +7,22 @@ This is a list of changes introduced in each release that users should be aware
 CuPy v10
 ========
 
-Dropping CUDA 9.2 Support
-----------------------------
+Dropping CUDA 9.2 / 10.0 / 10.1 Support
+---------------------------------------
 
-CUDA 9.2 is no longer supported.
-Use CUDA 10.0 or later.
+CUDA 10.1 or earlier is no longer supported.
+Use CUDA 9.2 or later.
 
 Dropping NCCL v2.4 Support
 -----------------------------
 
 NCCL v2.4 is no longer supported.
 
+Dropping Python 3.6 Support
+---------------------------
+
+Python 3.6 is no longer supported.
+
 Changes in :class:`cupy.cuda.Stream` Behavior
 ---------------------------------------------
 
@@ -106,6 +111,17 @@ NCCL and cuDNN No Longer Included in Wheels
 NCCL and cuDNN shared libraires are no longer included in wheels (see `#4850 <https://github.com/cupy/cupy/issues/4850>`_ for discussions). 
 You can manually install them after installing wheel if you don't have a previous installation; see :doc:`install` for details.
 
+cuTENSOR Enabled in Wheels
+--------------------------
+
+cuTENSOR can now be used when installing CuPy via wheels.
+
+``cupy.cuda.{nccl,cudnn}`` Modules Needs Explicit Import
+--------------------------------------------------------
+
+Previously ``import cupy.cuda`` automatically made ``cupy.cuda.nccl`` and ``cupy.cuda.cudnn`` modules available.
+In CuPy v9, you need to import them explicitly to use these modules (i.e., ``import cupy.cuda.nccl`` / ``import cupy.cuda.cudnn``.)
+
 Baseline API Changes
 --------------------
 


Code review comments:
diff_hunk: @@ -106,6 +111,17 @@ NCCL and cuDNN No Longer Included in Wheels
 NCCL and cuDNN shared libraires are no longer included in wheels (see `#4850 <https://github.com/cupy/cupy/issues/4850>`_ for discussions). 
 You can manually install them after installing wheel if you don't have a previous installation; see :doc:`install` for details.
 
+cuTENSOR Enabled in Wheels
+--------------------------
+
+cuTENSOR can now be used when installing CuPy via wheels.
+
+``cupy.cuda.{nccl,cudnn}`` Modules Needs Explicit Import
+--------------------------------------------------------
+
+Previously ``import cupy.cuda`` automatically made ``cupy.cuda.nccl`` and ``cupy.cuda.cudnn`` modules available.
path: docs/source/upgrade.rst
text: @user1:
```suggestion
Previously ``cupy.cuda.nccl`` and ``cupy.cuda.cudnn`` modules were available when directly importing CuPy with ``import cupy.cuda``
```

@author:
To be more precise, just doing `import cupy` made these modules available.
```suggestion
Previously ``cupy.cuda.nccl`` and ``cupy.cuda.cudnn`` modules were automatically imported.
```

@user1:
yeah, this sounds much better :)

diff_hunk: @@ -7,17 +7,22 @@ This is a list of changes introduced in each release that users should be aware
 CuPy v10
 ========
 
-Dropping CUDA 9.2 Support
-----------------------------
+Dropping CUDA 9.2 / 10.0 / 10.1 Support
+---------------------------------------
 
-CUDA 9.2 is no longer supported.
-Use CUDA 10.0 or later.
+CUDA 10.1 or earlier is no longer supported.
+Use CUDA 9.2 or later.
path: docs/source/upgrade.rst
text: @user1:
```suggestion
Use CUDA 10.2 or later.
```