Skip to content

Test GPU

Test GPU #7

Workflow file for this run

# Copyright 2024 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Test GPU
on:
pull_request:
workflow_dispatch:
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
test-gpu:
name: "Test AMD GPU Cluster"
runs-on: linux-mi300
steps:
- name: "Checking out repository"
uses: actions/checkout@v4
- name: "Setting up Python"
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: 3.11
# Test pytorch rocm
- name: "pytorch rocm test"
run: |
ls -a /home/runner
ls -a /etc/podinfo
cat /etc/podinfo/gha-render-devices
env
python3.11 -m venv test_venv
source test_venv/bin/activate
pip3 install --force-reinstall --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.2
python3.11 -c "import torch; print('CUDA available:', torch.cuda.is_available())"
echo $GHA_RENDER_DEVICES
# Test rocm commands
- name: "Test rocm commands"
run: |
rocm-smi
rocminfo