Skip to content

AMD PyTorch Job

AMD PyTorch Job #183

Workflow file for this run

name: AMD PyTorch Job
on:
workflow_dispatch:
inputs:
payload:
description: 'Content of the user submission, as json string'
required: true
type: string
requirements:
description: 'Contents for a requirements.txt file'
required: false
type: string
jobs:
run:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- name: mi300
runs-on: amdgpu-mi300-x86-64
venv-dir: $GITHUB_WORKSPACE
- name: mi250
runs-on: amdgpu-mi250-x86-64
venv-dir: /groups/aig_sharks/pytorch_venv
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Create input files
shell: bash
run: |
cat > "payload.json" <<'EOL'
${{ github.event.inputs.payload }}
EOL
- name: Setup Virtual Environment and Install Dependencies
shell: bash
run: |
python -m venv ${{ matrix.venv-dir }}
source ${{ matrix.venv-dir }}/bin/activate
pip install --upgrade pip
if [[ -n "${{ github.event.inputs.requirements }}" ]]; then
cat > "requirements.txt" <<'EOL'
${{ github.event.inputs.requirements }}
EOL
pip install -r "requirements.txt"
fi
- name: Run script
shell: bash
run: |
python3 .github/workflows/runner.py
cat result.json # Debug: show output
- name: Upload training artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: run-result-${{ matrix.name }}
path: |
result.json