-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.6 KB
/
test_gpu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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