All Projects → pytorch → Extension Ffi

pytorch / Extension Ffi

Examples of C extensions for PyTorch

Programming Languages

python
139335 projects - #7 most used programming language

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:

  • package - a pip distributable package
  • script - compiles the code into a local module, that can be later imported from other files

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].