diff --git a/README.md b/README.md index 724ca6511db..1d0b8ccd037 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ In other words, ClPy enables softwares written in CuPy to work also on OpenCL de ## Current status -Current ClPy is alpha version, forked from [CuPy v2.1.0](https://github.com/cupy/cupy/releases/tag/v2.1.0). +Current ClPy is beta version, forked from [CuPy v2.1.0](https://github.com/cupy/cupy/releases/tag/v2.1.0). ClPy is still under development and works on only limited APIs. * Basic [ndarray](https://docs-cupy.chainer.org/en/stable/reference/ndarray.html) are supported, but not perfectly * Basic [universal functions](https://docs-cupy.chainer.org/en/stable/reference/ufunc.html) are supported, but not perfectly -* Simple [custom kernels](https://docs-cupy.chainer.org/en/stable/reference/kernel.html) are supported, but some custom kernel codes might be fail to compile and/or run +* Most of [custom kernels](https://docs-cupy.chainer.org/en/stable/reference/kernel.html) are supported, but some custom kernel codes might be fail to compile and/or run * Only SGEMM is supported in BLAS library * Sparse matrix, dnn, rand libraries are not supported * half and complex are not supported @@ -21,7 +21,7 @@ ClPy is still under development and works on only limited APIs. Original CuPy's tests are not passed perfectly. See current [CuPy's test and example results](https://github.com/fixstars/ClPy/wiki/cupy_test_example_results). [Chainer](https://chainer.org/) works with limited situation. -Very simple and small examples are confirmed to work. See current [Chainer's test and example results](https://github.com/fixstars/ClPy/wiki/chainer_test_example_results). +Some examples are confirmed to work. See current [Chainer's test and example results](https://github.com/fixstars/ClPy/wiki/chainer_test_example_results). ## Recommended system @@ -42,7 +42,10 @@ We recommend those environments to all ClPy users. However, reports on other env ## Installation -First, install and setup OpenCL environment. +### Setup OpenCL + +Install and setup OpenCL environment. + `cl.h` and OpenCL libs (`libOpenCL.so`) must be able to be included and linked without any special path settings. For example with AMD APP SDK, you should set following environment variables: @@ -55,7 +58,8 @@ export LIBRARY_PATH=${LIBRARY_PATH}:${AMDAPPSDKROOT}/lib/x86_64 and add ldconfig on `/etc/ldconf.so.d/` and `$ sudo ldconfig`. -Second, install LLVM/Clang. +### Install LLVM/Clang + Current ClPy requires LLVM/Clang 4.0, 5.0, or 6.0. We **strongly** recommend that you build LLVM/Clang from the source codes and install it. However, at least in Ubuntu 16.04, you can use the LLVM/Clang from the Ubuntu official package repository. @@ -67,6 +71,8 @@ $ export PATH=/usr/lib/llvm-6.0/bin:$PATH $ export CPLUS_INCLUDE_PATH=/usr/lib/llvm-6.0/include:$CPLUS_INCLUDE_PATH ``` +### Install ClPy + After OpenCL and LLVM/Clang is successfully installed, install ClPy. ```console @@ -76,15 +82,15 @@ $ python setup.py install ## How to use -Just replace `cupy` to `clpy` in your python codes and run it (e.g. `import cupy` -> `import clpy`). - -You don't need to replace all cuda imports, if you add `import clpy` before `import cupy` in your python codes. -(`import clpy` add import hook. The hook will import clpy when `imoprt cupy` is called.) -If you want to switch clpy and cupy without changing source code, -set `export CLPY_NOT_HOOK_CUPY=1` before execution and disable hook. +Run your CuPy code with `-m clpy` option ( e.g. `python -m clpy /path/to/chainer/examples/mnist/train_mnist.py -g0`). +This option adds aliases to CuPy by hooking `import cupy` and call ClPy through `cupy.foobar`. +You don't need to modify any your codes. -Or you don't need to replace any codes, if you run your python code with `-m clpy` option ( e.g. `python -m clpy /path/to/chainer/examples/mnist/train_mnist.py -g0`). +If you don't want to run with `-m` option, you must add `import clpy` before `import cupy` in your codes. +`import clpy` adds the aliases same as `-m clpy`. +If you want to disable such aliases, set `export CLPY_NOT_HOOK_CUPY=1` before execution. +Then, you need to replace `cupy` to `clpy` in your all codes (e.g. `import cupy` -> `import clpy`). ### Woking with Chainer @@ -106,19 +112,17 @@ $ python -m pytest test_you_want.py ## Future plan -We are developing v0.2.1beta for next release. +We are developing v0.2.1beta1 for next release. -* Support Chainer's ImageNet example -* OpenCL version check and auto generated `api.pxd` from `cl.h` in the system * Map buffer for host memory -* Support all BLAS API -* Improve `cupy` aliasing mechanism -* Update recommended system (Vega and Volta) +* Support all BLAS APIs and accelerate them +* Multiple devices +* Multiple CommandQueue (Stream) * -- and other functions and/or bug fixes that someone develops and/or requests.. -We also plan to update CuPy's base version to v4 or v5 after above beta release. +We also plan to update CuPy's base version to v4 or v5 after beta release. -Check github's issues and pull requests to get latest status. +Check [github's issues and pull requests ](https://github.com/fixstars/clpy/issues) to get latest status. ## License diff --git a/clpy/_version.py b/clpy/_version.py index 2d0eb4d86b7..b573ee06c53 100644 --- a/clpy/_version.py +++ b/clpy/_version.py @@ -1 +1 @@ -__version__ = '2.1.0a0' +__version__ = '2.1.0b0'