forked from ROCm/aiter
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (74 loc) · 2.18 KB
/
Copy pathtriton-test.yaml
File metadata and controls
83 lines (74 loc) · 2.18 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Triton Test
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
triton:
runs-on: aiter-1gpu-runner
env:
DOCKER_IMAGE: "rocm/pytorch:latest"
TRITON_TEST: "op_tests/triton_tests/"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Clean up Rocm processes
run: |
rocm-smi
rocm-smi --showpids
echo 'Cleaning up ROCm processes...'
rocm-smi --showpids | awk '{if($1 ~ /^[0-9]+$/) print $1}' | xargs -r sudo kill -9 || true
rocm-smi
rocm-smi --showpids
- name: Run the container
run: |
set -ex
echo "Starting container: triton_test"
docker run -dt \
--device=/dev/dri \
--device=/dev/kfd \
--shm-size=16G \
--group-add $(getent group render | cut -d: -f3) \
--group-add $(getent group video | cut -d: -f3) \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
--name triton_test \
${{ env.DOCKER_IMAGE }}
- name: Setup-Triton
run: |
set -ex
echo "Setuping Triton..."
docker exec \
-w /workspace \
triton_test \
./.github/scripts/build_triton.sh
- name: Install Pytest
run: |
set -ex
echo "Installing Pytest..."
docker exec \
-w /workspace \
triton_test \
pip install pytest
- name: Triton Tests
run: |
set -ex
echo "Running Triton Tests..."
docker exec -w /workspace triton_test mkdir -p test-reports
docker exec -w /workspace triton_test pytest -v ${{ env.TRITON_TEST }} --junitxml=test-reports/triton.xml
- name: Upload test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: triton-test-logs
path: test-reports/triton.xml
- name: Cleanup container
if: always()
run: |
docker rm -f triton_test || true