TorchAcc is built on top of PyTorch/XLA, and it requires a specific version of PyTorch/XLA to to ensure GPU compatibility and performance. We highly recommend you to use our prebuilt Docker image to start your development work.
If you want to build from source, you first need to build PyTorch and torch_xla from source.
- build PyTorch
git clone --recursive -b v2.3.0 [email protected]:AlibabaPAI/pytorch.git
cd pytorch
python setup.py develop
- build torch_xla
git clone --recursive -b acc [email protected]:AlibabaPAI/xla.git
cd xla
USE_CUDA=1 XLA_CUDA=1 python setup.py develop
- build torchacc
python setup.py develop
- UT
sh tests/run_ut.sh