You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An example of writing a C++ extension for PyTorch.
3
+
An example of writing a C++ extension for PyTorch. See
4
+
[here](http://pytorch.org/docs/0.3.1/notes/cpp-extensions.html) for the accompanying tutorial.
5
+
6
+
There are a few "sights" you can metaphorically visit in this repository:
7
+
8
+
- Inspect the C++ and CUDA extensions in the `cpp/` and `cuda/` folders,
9
+
- Build C++ and/or CUDA extensions by going into the `cpp/` or `cuda/` folder and executing `python setup.py install`,
10
+
- JIT-compile C++ and/or CUDA extensions by going into the `cpp/` or `cuda/` folder and calling `python jit.py`, which will JIT-compile the extension and load it,
11
+
- Benchmark Python vs. C++ vs. CUDA by running `python benchmark.py {py, cpp, cuda} [--cuda]`,
12
+
- Run gradient-checks on the code by running `python grad_check.py {py, cpp, cuda}`.
0 commit comments