OpenCL for Python

后端 未结 4 1131
无人共我
无人共我 2021-02-13 10:56

I\'m looking for a good OpenCL wrapper\\library for Python, with good documentation. I tried to search some... but couldn\'t find one good enough.

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-13 11:22

    We are developing opencl4py, higher level bindings. This project uses CFFI, so it works on Pypy.

    The major issue we encountered with pyopencl is that 'import pyopencl' does OpenCL initialization and takes the whole virtual memory in case of NVIDIA driver, preventing from correct forking and effectively disabling multiprocessing (yes, we claim that using pyopencl disables multiprocessing at least with NVIDIA). opencl4py uses lazy OpenCL initialization, resolving this "import hell".

    Later, it gained some nice features like super easy binary program caching, etc. Unfortunately, the documentation is somewhat brief. The best way to learn how it works is go through the tests.

提交回复
热议问题