numba / pyculib

Pyculib - Python bindings for CUDA libraries
BSD 2-Clause "Simplified" License
97 stars 11 forks source link

development question - ctypes or cffi? #7

Open lebedov opened 7 years ago

lebedov commented 7 years ago

I noticed that cffi is a dependency of pyculib even though the bindings are currently based on ctypes. Are there plans to switch over to cffi?

seibert commented 7 years ago

Good catch! This was left over from the VML part of Accelerate that isn't relevant to pyculib. We'll remove the cffi dependency.

lebedov commented 7 years ago

Relatedly, are the ctypes bindings in pyculib maintained by hand? Given the growing number of GPU libraries available, I've toyed with autogeneration of low-level wrappers using cffi combined with a C/C++ header parser to reduce time spent on manual wrapper maintenance in scikit-cuda. Have you considering doing something similar?

seibert commented 7 years ago

Yes, they are created by hand right now. We haven't really looked at auto-generation too much, although we are certainly open to the idea.

stuartarchibald commented 7 years ago

Turns out the CFFI is needed for Numba bindings to CUDA. CFFI is technically an optional dependency for Numba but it is needed for the CUDA part, so I believe it has to remain.