Commit ec66d01
committed
Modernize extension-cpp; refactor code
This PR:
- creates a single unified build for extension-cpp (instead of having
separate cpu/cuda setup.pys).
- Updates the build system to use pyproject.toml (instead of only
setup.py)
- Uses TORCH_LIBRARY to bind operators (instead of using PyBind)
There will be more future work to add improvements (e.g. torch.compile
support) and also fix up the corresponding C++ extensions tutorial.
Test Plan:
- Refactored all of the tests under test/
ghstack-source-id: a31d059
Pull Request resolved: #861 parent 1031028 commit ec66d01
File tree
24 files changed
+334
-582
lines changed- cpp
- cuda
- extension_cpp
- csrc
- cuda
- python
- test
24 files changed
+334
-582
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
This file was deleted.
This file was deleted.
Whitespace-only changes.
This file was deleted.
This file was deleted.
This file was deleted.
Whitespace-only changes.
This file was deleted.
This file was deleted.
0 commit comments