chainerx, can be installed as a top level Python package along with Chainer by configuring the environment variables below.
Chainer must currently be installed from source in order to include ChainerX, but this is expected to change in the near future.
Configure the following environment variables before installing Chainer.
||Path to your cuDNN installation. Required when
Installing from source¶
pip install --pre chainer after configuring the above environment variables.
For instance, to install ChainerX without CUDA support, run the following:
$ export CHAINER_BUILD_CHAINERX=1 $ export MAKEFLAGS=-j8 # Using 8 parallel jobs. $ pip install --pre chainer
When installing with the CUDA support, you also need to specify the cuDNN installation path since CUDA without cuDNN is currently not supported.
To support the NumPy/CuPy fallback mechanism, currently ChainerX with the CUDA support requires CuPy to be installed together.
For ChainerX, we suggest that you do not install CuPy with a CuPy wheel (precompiled binary) package because it contains a cuDNN library. Installation would fail if the versions of the cuDNN library contained in the CuPy wheel package and the one specified in CUDNN_ROOT_DIR were different.
$ export CHAINER_BUILD_CHAINERX=1 $ export CHAINERX_BUILD_CUDA=1 $ export CUDNN_ROOT_DIR=path/to/cudnn $ export MAKEFLAGS=-j8 # Using 8 parallel jobs. $ pip install --pre cupy $ pip install --pre chainer