ebetica / autogradpp

Direct C++ Interface to PyTorch
MIT License
80 stars 12 forks source link

AUTOGRADPP

This is an experimental C++ frontend to pytorch's C++ backend. Use at your own risk.

How to build:

git submodule update --init --recursive

cd pytorch
# On Linux:
python setup.py build
# On macOS (may need to prefix with `MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++` when using anaconda)
LDSHARED="cc -dynamiclib -undefined dynamic_lookup" python setup.py build

cd ..; mkdir -p build; cd build
cmake .. -DPYTHON_EXECUTABLE:FILEPATH=$(which python)  # helpful if you use anaconda
make -j

Stuff

Some things are not implemented:

Otherwise, lots of other things work. There may be breaking API changes.