-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathsetup_rcclx.sh
More file actions
executable file
·29 lines (25 loc) · 1.14 KB
/
setup_rcclx.sh
File metadata and controls
executable file
·29 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
set -x # print commands before running them
set -euo pipefail # exit script on errors
python -m pip install --upgrade pip
conda install conda-forge::libopenssl-static conda-forge::rsync -y
conda install conda-forge::glog=0.4.0 conda-forge::gflags conda-forge::fmt -y
ITER_BUILD_DIR=/tmp/torchcomms_build2/fbcode
mkdir -p "$ITER_BUILD_DIR"
pushd "$ITER_BUILD_DIR" || exit
FBCODE_DIR=$HOME/fbsource/fbcode
rsync -av --exclude 'analyzer/ground_truth_csvs' --exclude 'analyzer/integration_test_data' "$FBCODE_DIR"/comms . -q
cp "$FBCODE_DIR"/comms/github/*.sh .
cp "$FBCODE_DIR"/comms/github/setup.py .
cp "$FBCODE_DIR"/comms/github/CMakeLists.txt .
cp "$FBCODE_DIR"/comms/github/version.txt .
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/rocm6.4
export BUILD_RCCL_ONLY=1
export BUILDDIR=${PWD}/build/rcclx
export ROCM_HOME=/opt/rocm
export RCCLX_INCLUDE=${BUILDDIR}/include/rccl
export RCCLX_LIB=${BUILDDIR}/lib
./build_rcclx.sh
pip install numpy
USE_TRANSPORT=OFF USE_NCCL=0 USE_NCCLX=0 USE_GLOO=0 USE_RCCL=0 USE_RCCLX=1 pip install --no-build-isolation -v '.[dev]'