-
Notifications
You must be signed in to change notification settings - Fork 24
Add build_test file for RCCL (#18) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sudharssun
wants to merge
1
commit into
main
Choose a base branch
from
export-D84125652
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+89
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,88 @@ | ||||||||||
| name: Build RCCL | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| pull_request: | ||||||||||
|
|
||||||||||
| permissions: | ||||||||||
| id-token: write | ||||||||||
| contents: read | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build: | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
| matrix: | ||||||||||
| include: | ||||||||||
| - name: RCCL | ||||||||||
| runs-on: amd-mi350-runner | ||||||||||
| gpu-arch-type: "rocm" | ||||||||||
| gpu-arch-version: "7.0" | ||||||||||
| torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/rocm7.0' | ||||||||||
| docker-image: pytorch/manylinux2_28-builder:rocm7.0 | ||||||||||
| cmake-version: "latest" | ||||||||||
| uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | ||||||||||
| with: | ||||||||||
| timeout: 180 | ||||||||||
| runner: ${{ matrix.runs-on }} | ||||||||||
| gpu-arch-type: ${{ matrix.gpu-arch-type }} | ||||||||||
| gpu-arch-version: ${{ matrix.gpu-arch-version }} | ||||||||||
| script: | | ||||||||||
| set -ex | ||||||||||
| # use faster libmamba solver | ||||||||||
| conda config --set solver libmamba | ||||||||||
|
|
||||||||||
| # TODO: remove dependency on fbwhoami | ||||||||||
| echo "DEVICE_NAME=$(hostname)" > /etc/fbwhoami | ||||||||||
| cat /etc/fbwhoami | ||||||||||
|
|
||||||||||
| # For picking C++ 20 compiler from toolset-11 | ||||||||||
| export PATH=/opt/rh/gcc-toolset-11/root/usr/bin:$PATH | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| export CXX=/opt/rh/gcc-toolset-11/root/usr/bin/c++ | ||||||||||
| export CC=/opt/rh/gcc-toolset-11/root/usr/bin/cc | ||||||||||
|
|
||||||||||
| conda create -n venv python=${{ matrix.python-version }} -y | ||||||||||
| conda activate venv | ||||||||||
| 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 | ||||||||||
|
|
||||||||||
| pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/rocm7.0 | ||||||||||
|
|
||||||||||
| if [ "${{ matrix.cmake-version }}" = "latest" ]; then | ||||||||||
| conda install -y cmake | ||||||||||
| else # default to latest | ||||||||||
| conda install -y cmake==${{ matrix.cmake-version }} | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| pip install -r requirements.txt | ||||||||||
|
|
||||||||||
| export BUILD_RCCL_ONLY=1 | ||||||||||
| export ROCM_HOME=/opt/rocm | ||||||||||
| export RCCL_INCLUDE=$ROCM_HOME/include/rccl | ||||||||||
| export USE_SYSTEM_LIBS=1 | ||||||||||
| export USE_RCCL=1 | ||||||||||
| ./build_rccl.sh | ||||||||||
| pip install numpy | ||||||||||
| USE_NCCL=0 USE_NCCLX=0 USE_GLOO=0 USE_RCCL=1 pip install --no-build-isolation -v -e . | ||||||||||
|
|
||||||||||
| # Verify installation | ||||||||||
| python -c "import torch; print(f'PyTorch version: {torch.__version__}')" | ||||||||||
| python -c "import torch; print(f'HIP available: {torch.cuda.is_available()}')" | ||||||||||
| python -c "import torchcomms; print('TorchComms imported successfully')" | ||||||||||
|
|
||||||||||
| # Test RCCL backend availability | ||||||||||
| python -c " | ||||||||||
| import torchcomms | ||||||||||
| try: | ||||||||||
| comm = torchcomms.new_comm('rccl', torch.device('hip'), 'test_comm') | ||||||||||
| print('RCCL backend available') | ||||||||||
| except Exception as e: | ||||||||||
| print(f'RCCL backend test failed: {e}') | ||||||||||
| " | ||||||||||
|
|
||||||||||
| # Run integration tests | ||||||||||
| echo "Running RCCL integration tests..." | ||||||||||
| comms/torchcomms/scripts/run_tests_integration_rccl_py.sh | ||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,5 +75,5 @@ else | |
| export RCCL_HOME=$ROCM_HOME/lib | ||
| fi | ||
|
|
||
| popd || exit 1 | ||
| popd || true | ||
| pip install numpy | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI can you please try to override PATH: