pytorch / extension-ffi

Examples of C extensions for PyTorch
258 stars 70 forks source link

PyTorch C FFI examples

In this repository you can find examples showing how to extend PyTorch with custom C code. To use the ffi you need to install the cffi package from pip.

Currently there are two examples:

You may also want to look at pytorch/audio for an example of a type-generic C FFI extension.