Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/opus-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: OPUS Test

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [main]
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'

workflow_dispatch:
schedule:
- cron: '0 22 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
DOCKER_IMAGE: "rocm/pytorch:latest"

jobs:
check-signal:
if: ${{ !github.event.pull_request || github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download and check signal artifact
run: ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}

opus:
if: >-
(!github.event.pull_request || github.event.pull_request.draft == false) &&
github.event.action != 'labeled'
Comment on lines +42 to +43
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level condition github.event.action != 'labeled' is currently redundant because this workflow’s pull_request.types does not include labeled. Either remove this condition or add labeled to the PR trigger types if label-gating is intended.

Suggested change
(!github.event.pull_request || github.event.pull_request.draft == false) &&
github.event.action != 'labeled'
!github.event.pull_request || github.event.pull_request.draft == false

Copilot uses AI. Check for mistakes.
name: OPUS Tests (${{ matrix.label }})
needs: check-signal
strategy:
fail-fast: false
matrix:
include:
- runner: linux-aiter-mi35x-1
label: MI35X
- runner: aiter-1gpu-runner
label: MI325
runs-on: ${{ matrix.runner }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Run the container
run: |
set -ex
echo "Starting container: aiter_opus_test"

if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi

docker run -dt \
--device=/dev/kfd $DEVICE_FLAG \
--shm-size=16G \
--network=host \
--group-add $(getent group render | cut -d: -f3) \
--group-add $(getent group video | cut -d: -f3) \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
--name aiter_opus_test \
${{ env.DOCKER_IMAGE }}
Comment on lines +62 to +82
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a docker login step (e.g., docker login -u rocmshared -p ${{ secrets.DOCKER_PASSWORD }} || true) before docker run. Many other GPU workflows in this repo do this to avoid intermittent Docker Hub pull failures/rate limits when using rocm/pytorch:latest.

Copilot uses AI. Check for mistakes.

- name: Show OPUS test environment
run: |
set -ex
docker exec \
-w /workspace \
aiter_opus_test \
bash -lc "python3 -c \"import torch; print(torch.__version__)\" && hipcc --version"

- name: OPUS tests
timeout-minutes: 30
run: |
set -ex
docker exec \
-w /workspace \
aiter_opus_test \
bash -lc "set -o pipefail && ./op_tests/opus/run_tests.sh 2>&1 | tee latest_test.log"

- name: Upload OPUS test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: opus-test-log-${{ matrix.runner }}
path: latest_test.log
if-no-files-found: warn

- name: Cleanup container
if: always()
run: |
docker rm -f aiter_opus_test || true
Loading