pyculib
pyculib copied to clipboard
development question - ctypes or cffi?
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?
Good catch! This was left over from the VML part of Accelerate that isn't relevant to pyculib. We'll remove the cffi dependency.
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?
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.
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.