move ccache description to contributor guide
@@ -296,19 +296,6 @@ In order to run unit tests at the repository root, you first have to build Cytho
$ git clean -fdx
-.. note::
-
- It's not officially supported, but you can use `ccache <https://ccache.samba.org/>`_ to reduce compilation time.
- On Ubuntu 16.04, you can set up as follows::
-
- $ sudo apt-get install ccache
- $ export PATH=/usr/lib/ccache:$PATH
-
- See `ccache <https://ccache.samba.org/>`_ for details.
-
- If you want to use ccache for nvcc, please install ccache v3.3 or later.
- You also need to set environment variable ``NVCC='ccache nvcc'``.
-
Once Cython modules are built, you can run unit tests by running the following command at the repository root::
$ python -m pytest
@@ -454,3 +441,36 @@ Open ``index.html`` with the browser and see if it is rendered as expected.
Docstrings (documentation comments in the source code) are collected from the installed CuPy module.
If you modified docstrings, make sure to install the module (e.g., using `pip install -e .`) before building the documentation.
+
+
+Tips for Developers
+-------------------
+
+Here are some tips for developers hacking CuPy source code.
+
+Install as Editable
+~~~~~~~~~~~~~~~~~~~
+
+During the development we recommend using ``pip`` with ``-e`` option to install as editable mode::
+
+ $ pip install -e .
+
+Please note that even with ``-e``, you will have to rerun ``pip install -e .`` to regenerate C++ sources using Cython if you modified Cython source files (e.g., ``*.pyx`` files).
+
+Use ccache
+~~~~~~~~~~
+
+``NVCC`` environment variable can be specified at the build time to use the custom command instead of ``nvcc`` .
+You can speed up the rebuild using `ccache <https://ccache.dev/>`_ (v3.4 or later) by::
+
+ $ export NVCC='ccache nvcc'
+
+Limit Architecture
+~~~~~~~~~~~~~~~~~~
+
+Use ``CUPY_NVCC_GENERATE_CODE`` environment variable to reduce the build time by limiting the target CUDA architectures.
+For example, if you only run your CuPy build with NVIDIA P100 and V100, you can use::
+
+ $ export CUPY_NVCC_GENERATE_CODE=arch=compute_60,code=sm_60;arch=compute_70,code=sm_70
+
+See :doc:`reference/environment` for the description.
