pyculib icon indicating copy to clipboard operation
pyculib copied to clipboard

development question - ctypes or cffi?

Open lebedov opened this issue 7 years ago • 4 comments

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?

lebedov avatar Aug 02 '17 14:08 lebedov

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

seibert avatar Aug 02 '17 14:08 seibert

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?

lebedov avatar Aug 02 '17 14:08 lebedov

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.

seibert avatar Aug 02 '17 14:08 seibert

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.

stuartarchibald avatar Aug 29 '17 12:08 stuartarchibald