https://github.com/pytorch/extension-ffi
Examples of C extensions for PyTorch
https://github.com/pytorch/extension-ffi
Last synced: 4 months ago
JSON representation
Examples of C extensions for PyTorch
- Host: GitHub
- URL: https://github.com/pytorch/extension-ffi
- Owner: pytorch
- Archived: true
- Created: 2016-10-03T08:57:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-12T02:09:07.000Z (almost 3 years ago)
- Last Synced: 2024-09-27T20:03:21.430Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 258
- Watchers: 35
- Forks: 70
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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.