Development
If you want to develop new feature, please follow below steps to set up development environment.
We suggest you to use Visual Studio Code and install the recommended extensions for this project. You can also develop online with GitHub Codespaces.
#
Check EnvironmentFollow System Requirements.
#
Set upClone code.
git clone --recurse-submodules https://github.com/azure/MS-AMPcd MS-AMP
Install MS-AMP.
python3 -m pip install --upgrade pippython3 -m pip install -e .[test]make postinstall
Install MSCCL and preload msamp_dist library.
cd third_party/msccl# H100make -j src.build NVCC_GENCODE="-gencode=arch=compute_90,code=sm_90"apt-get updateapt install build-essential devscripts debhelper fakerootmake pkg.debian.builddpkg -i build/pkg/deb/libnccl2_*.debdpkg -i build/pkg/deb/libnccl-dev_2*.deb
cd -NCCL_LIBRARY=/usr/lib/x86_64-linux-gnu/libnccl.so # Change as neededexport LD_PRELOAD="/usr/local/lib/libmsamp_dist.so:${NCCL_LIBRARY}:${LD_PRELOAD}"
#
Lint and TestFormat code using yapf.
python3 setup.py format
Check code style with mypy and flake8.
python3 setup.py lint
Run unit tests.
python3 setup.py test
Open a pull request to main branch on GitHub.