Skip to content

Commit 08a2f88

Browse files
authored
Merge pull request pytorch#13 from SeanNaren/master
Added FFI build call
2 parents e3d7529 + c1218a3 commit 08a2f88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Creating Extensions using FFI.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ Now, you'll need a super short file, that will build your custom extension:
4848
```python
4949
# build.py
5050
from torch.utils.ffi import create_extension
51-
create_extension(
51+
ffi = create_extension(
5252
name='_ext.my_lib',
5353
headers='src/my_lib.h',
5454
sources=['src/my_lib.c'],
5555
with_cuda=False
5656
)
57+
ffi.build()
5758
```
5859

5960
## Step 2: Include it in your Python code

0 commit comments

Comments
 (0)