Repository navigation
131 lines (126 loc) · 4.24 KB
/
Copy pathcall_precommit.yml
File metadata and controls
131 lines (126 loc) · 4.24 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
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
name: call-precommit
permissions: read-all
on:
workflow_call:
inputs:
pr_num:
description: 'The pull request number'
type: string
default: ''
python_version:
description: 'Python version'
type: string
required: true
gpu_enabled:
description: 'Enable gpu tests'
type: boolean
default: false
override_requirements:
description: 'Override requirements'
default: ''
type: string
required: false
env:
UV_SYSTEM_PYTHON: 'true'
defaults:
run:
shell: bash
jobs:
cpu:
name: ${{ matrix.scope }}
timeout-minutes: 40
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- scope: common
runner: ubuntu-latest
install: install-common
test: test-common
workers: 2
- scope: openvino
runner: ubuntu-latest-8-cores
install: install-openvino
test: test-openvino
workers: 4
- scope: pytorch-cpu
runner: ubuntu-latest
install: install-torch
test: test-torch-cpu
workers: 2
- scope: onnx
runner: ubuntu-latest-8-cores
install: install-onnx
test: test-onnx
workers: 4
- scope: tools
runner: ubuntu-latest
install: install-tools
test: test-tools
workers: 1
env:
NUM_WORKERS: ${{ matrix.workers }}
steps:
- name: CPU Info
run: awk 'BEGIN{RS=""} END{print}' /proc/cpuinfo
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
ref: ${{ inputs.pr_num != '' && format('refs/pull/{0}/head', inputs.pr_num) || github.ref }}
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: make ${{ matrix.install }}
- name: Print installed modules
run: pip list
- name: Run precommit test scope
run: make ${{ matrix.test }}
pytorch-cuda:
timeout-minutes: 40
runs-on: aks-linux-6-cores-55gb-gpu-a10
if: ${{ inputs.gpu_enabled == true }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install dependencies
run : |
sudo apt-get update
sudo apt-get --assume-yes install build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make
- name: Download CUDA
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/13.2.1/local_installers/cuda_13.2.1_595.58.03_linux.run
sudo sh cuda_13.2.1_595.58.03_linux.run --toolkit --silent
- name: CPU Info
run: awk 'BEGIN{RS=""} END{print}' /proc/cpuinfo
- name: GPU Info
run: nvidia-smi
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
ref: ${{ inputs.pr_num != '' && format('refs/pull/{0}/head', inputs.pr_num) || github.ref }}
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: make install-torch
- name: Print installed modules
run: pip list
- name: Check CUDA
run: |
python -c "import torch; print(torch.cuda.is_available())"
- name: Run PyTorch precommit test scope
run: make test-torch-gpu