-
Notifications
You must be signed in to change notification settings - Fork 95
133 lines (107 loc) · 3.64 KB
/
pr_tests.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: GPU Enabled Integration Test on PRs
on:
pull_request:
branches:
- main
push:
branches:
- ci-*
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
OPTIMUM_NVIDIA_IS_CI: ON
HF_HUB_ENABLE_HF_TRANSFER: ON
jobs:
run_gpu_tests:
strategy:
fail-fast: false
matrix:
config:
- name: Optimum-Nvidia Test Suite
image: nvidia/cuda:12.6.3-devel-ubuntu24.04
gpu_target: ["aws-g6-12xlarge-cache", "aws-g5-12xlarge-cache"]
name: ${{ matrix.config.name }}
runs-on:
group: "${{matrix.gpu_target}}"
container:
image: ${{ matrix.config.image }}
options: --mount type=tmpfs,destination=/tmp --privileged --shm-size 64gb --gpus all --ipc host -v /mnt/hf_cache:/mnt/cache/
env:
HF_TOKEN: ${{ secrets.OPTIMUM_NVIDIA_HUB_READ_TOKEN }}
defaults:
run:
shell: bash
steps:
- name: Change ownership of /github/home
run: chown -R $(whoami) /github/home
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Checkout optimum-nvidia
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt update && apt install -y libmpich-dev libopenmpi-dev openmpi-bin git
python3 -m pip install --upgrade -e .[quality,tests] --extra-index-url https://pypi.nvidia.com
- name: Run nvidia-smi
run: |
nvidia-smi
- name: Print TensorRT-LLM version
run: |
python -c "from tensorrt_llm import __version__; print(__version__)"
- name: Run optimum-nvidia test-suite
run: |
pytest -s -v -p no:warnings -o log_cli=true --ignore=tests/cli tests/
run_optimum_cli_tests:
strategy:
fail-fast: false
matrix:
config:
- name: Optimum-Nvidia CLI Test Suite
image: nvidia/cuda:12.6.3-devel-ubuntu24.04
gpu_target: ["aws-g6-12xlarge-cache", "aws-g5-12xlarge-cache"]
name: ${{ matrix.config.name }}
runs-on:
group: "${{matrix.gpu_target}}"
container:
image: ${{ matrix.config.image }}
options: --mount type=tmpfs,destination=/tmp --privileged --shm-size 64gb --gpus all --ipc host -v /mnt/hf_cache:/mnt/cache/
env:
HF_TOKEN: ${{ secrets.OPTIMUM_NVIDIA_HUB_READ_TOKEN }}
defaults:
run:
shell: bash
steps:
- name: Change ownership of /github/home
run: chown -R $(whoami) /github/home
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Checkout optimum-nvidia
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt update && apt install -y openmpi-bin libopenmpi-dev git
python3 -m pip install --upgrade -e .[quality,tests] --extra-index-url https://pypi.nvidia.com
- name: Run nvidia-smi
run: |
nvidia-smi
- name: Print TensorRT-LLM version
run: |
python -c "from tensorrt_llm import __version__; print(__version__)"
- name: Run optimum-nvidia cli test-suite
run: |
pytest -rx -s -p no:warnings tests/cli
- name: Tailscale Wait
if: ${{ failure() || runner.debug == '1' }}
uses: huggingface/tailscale-action@main
with:
waitForSSH: true
authkey: ${{ secrets.TAILSCALE_SSH_AUTHKEY }}
slackChannel: ${{ secrets.SLACK_CIFEEDBACK_CHANNEL }}
slackToken: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}