A braid interface to pytorch
- python libs: cython mpi4py pytorch
- build of xbraid
- MPI compiler
Conda environments can be found in 'torchbraid/env' directories. These can be used too get a consistent conda enviroonement for using torchbraid. The one caveat, is that mpi4py should be installed consistenclty with the MPI compiler. In some cases doing a 'pip install mpi4py' is to be preferred to installing it through conda (conda installs an alternate MPI compiler and library. You might want mpi4py to use the native one on your platform).
Note, the cython version is pretty important, particularly if torch layers are shipped directly by braid.
- Download from git@github.com:XBraid/xbraid.git
- The master branch should work fine
- From the xbraid directory run
make debug=no braid
- Copy makefile.inc.example to makefile.inc
- Modify makefile.inc to include your build specifics
- Type make
- You will need to add
export PYTHONPATH=${TORCHBRAID_DIR}/torchbraid:${TORCHBRAID_DIR}:${PYTHONPATH}to your environment, this makes sure that the python search path for modules is setup
Take look at code in the examples directory.
make testsmake tests-serial
make clean
make uninstall
- Cyr, Eric C., Stefanie Günther, and Jacob B. Schroder. "Multilevel Initialization for Layer-Parallel Deep Neural Network Training." arXiv preprint arXiv:1912.08974 (2019). Link
- Günther, Stefanie, Lars Ruthotto, Jacob B. Schroder, Eric C. Cyr, and Nicolas R. Gauger. "Layer-parallel training of deep residual neural networks." SIAM Journal on Mathematics of Data Science 2, no. 1 (2020): 1-23. Link