YOSHIFUJI Naoki
YOSHIFUJI Naoki
Current clpy creates and uses [only one command_queue](https://github.com/fixstars/clpy/blob/dec25c342032617d61e6b71ad5836b16005cc29a/clpy/backend/opencl/env.pyx#L53-L55) and [clpy.backend.stream](https://github.com/fixstars/clpy/blob/dec25c342032617d61e6b71ad5836b16005cc29a/clpy/backend/stream.py) implementation is empty. Supporting this increases performance.
Currently, all async memory operation are implemented as sync. * https://github.com/fixstars/clpy/blob/3fd3b234e6c43ce3ba97642280ad902b2e1e7cc8/clpy/backend/memory.pyx#L300-L301 * https://github.com/fixstars/clpy/blob/3fd3b234e6c43ce3ba97642280ad902b2e1e7cc8/clpy/backend/memory.pyx#L335-L336 * https://github.com/fixstars/clpy/blob/3fd3b234e6c43ce3ba97642280ad902b2e1e7cc8/clpy/backend/memory.pyx#L407-L408 * https://github.com/fixstars/clpy/blob/3fd3b234e6c43ce3ba97642280ad902b2e1e7cc8/clpy/backend/memory.pyx#L432-L433 They are should be implemented as async.
https://github.com/fixstars/clpy/blob/clpy/tests/clpy_tests/test_numpy_interop.py
On a machine with no platform, [current ClPy](https://github.com/fixstars/clpy/blob/0dfb37e9dcaf56fab0a95268f6bf3886c8a55f44/clpy/backend/opencl/env.pyx#L80-L83) got an error as follows: ```shell $ python Python 3.6.5 (default, Feb 12 2019, 02:34:25) [GCC 5.4.0 20160609] on linux Type "help",...
CG is not converged only in GPU (outputs NaN) ``` $ python cg.py Trial: 0 Running CPU... Failed to converge. Increase max-iter or tol. CPU : 52.715649 sec 0.0486944550392 Running...
https://github.com/fixstars/clpy/blob/clpy/tests/clpy_tests/test_init.py
Current ClPy supports only sgemm, which is [manually implemented](https://github.com/fixstars/clpy/blob/2f10c62bfa70131484ea524a6db4a425d13ee8d8/clpy/backend/opencl/blas.pyx#L321-L384).
https://github.com/fixstars/clpy/blob/dec25c342032617d61e6b71ad5836b16005cc29a/clpy/core/core.pyx#L2162
https://github.com/fixstars/clpy/blob/a60ed24f67c9e76dab88ce73eff67e5092469719/clpy/backend/__init__.py#L37-L50
Currently there is only [atomicAdd for fp32](https://github.com/fixstars/clpy/blob/2f10c62bfa70131484ea524a6db4a425d13ee8d8/clpy/core/include/clpy/carray.clh#L469-L483), to pass [Chainer](https://github.com/chainer/chainer/blob/v3.3.0/chainer/functions/connection/embed_id.py#L82-L87)'s example (e.g. ptb).