# extension-ffi **Repository Path**: mirrors_pytorch/extension-ffi ## Basic Information - **Project Name**: extension-ffi - **Description**: Examples of C extensions for PyTorch - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2025-10-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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](https://github.com/pytorch/audio/) for an example of a type-generic C FFI extension.