Skip to content

Commit

Permalink
use rocm docker
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Dec 17, 2024
1 parent 9e08eb9 commit 7f95e5e
Showing 1 changed file with 41 additions and 19 deletions.
60 changes: 41 additions & 19 deletions .github/workflows/build_zoom_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ jobs:
matrix:
include:
- name: "ubuntu-22.04"
# runs-on: "nodai-amdgpu-mi250-x86-64"
runs-on: "nod-ai-shared-cpubuilder-manylinux-x86_64"
# container: "rocm/pytorch:rocm6.2.3_ubuntu22.04_py3.10_pytorch_release_2.3.0"
runs-on: "nodai-amdgpu-mi250-x86-64"
# container: "rocm/pytorch:rocm6.2.3_ubuntu22.04_py3.10_pytorch_release_2.3.0"
# runs-on: "nod-ai-shared-cpubuilder-manylinux-x86_64"

runs-on: ${{ matrix.runs-on }}

name: ${{ matrix.name }}

env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
# either the PR number or `branch-N` where N always increments
CACHE_KEY: linux-build-test-cpp-asserts-manylinux-v2-${{ format('{0}-{1}', github.ref_name, github.run_number) }}

defaults:
run:
shell: bash
Expand All @@ -59,29 +64,46 @@ jobs:
with:
submodules: true

- name: "Setup ROCm"
id: rocm
run: |
- name: Enable cache
uses: actions/cache/restore@v3
with:
path: ${{ env.CACHE_DIR }}
key: ${{ env.CACHE_KEY }}
restore-keys: linux-build-test-cpp-

# - name: "Setup ROCm"
# id: rocm
# run: |

tee --append /etc/yum.repos.d/rocm.repo <<EOF
[ROCm-6.3]
name=ROCm6.3
baseurl=https://repo.radeon.com/rocm/el8/6.3/main
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
dnf clean all
dnf install -y rocm hipblas-common-devel hip-devel
# tee --append /etc/yum.repos.d/rocm.repo <<EOF
# [ROCm-6.3]
# name=ROCm6.3
# baseurl=https://repo.radeon.com/rocm/el8/6.3/main
# enabled=1
# priority=50
# gpgcheck=1
# gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
# EOF
# dnf clean all
# dnf install -y rocm hipblas-common-devel hip-devel

- name: "Build PyTorch"
id: build
run: |
export CCACHE_DIR="${{ env.CACHE_DIR }}"
export CMAKE_C_COMPILER_LAUNCHER=ccache
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros
pip install -r requirements.txt
./build.sh
- name: Save cache
uses: actions/cache/save@v3
if: ${{ !cancelled() }}
with:
path: ${{ env.CACHE_DIR }}
key: ${{ env.CACHE_KEY }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 7f95e5e

Please sign in to comment.