Skip to content

Test GPU

Test GPU #20

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 rocm
- name: "rocm test"
run: |
ls -a /home/runner
ls -a /etc/podinfo
cat /etc/podinfo/gha-render-devices
if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi
echo $DEVICE_FLAG
docker pull rocm/dev-ubuntu-22.04:6.3
docker run -dt --network=host --device=/dev/kfd $DEVICE_FLAG \
--group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
--name ci_container_test \
rocm/dev-ubuntu-22.04:6.3
# Test rocm commands
- name: "Test rocm commands"
run: |
docker exec ci_container_test rocm-smi
docker exec ci_container_test rocminfo