-
Notifications
You must be signed in to change notification settings - Fork 4.9k
82 lines (71 loc) · 2.56 KB
/
Copy pathnv-pre-compile-ops.yml
File metadata and controls
82 lines (71 loc) · 2.56 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
name: nv-pre-compile-ops
on:
workflow_dispatch:
pull_request:
branches:
'**'
merge_group:
branches: [ master ]
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-paths:
name: nv-pre-compile-ops / check paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.non_pr.outputs.should_run || steps.filter.outputs.run_tests }}
steps:
- id: non_pr
if: github.event_name != 'pull_request'
run: echo "should_run=true" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@v3
id: filter
if: github.event_name == 'pull_request'
with:
predicate-quantifier: every
filters: |
run_tests:
- '**'
- '!docs/**'
- '!blogs/**'
- '!deepspeed/inference/v2/**'
- '!tests/unit/inference/v2/**'
unit-tests:
name: nv-pre-compile-ops / precompile ops
needs: check-paths
if: ${{ !cancelled() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true') }}
runs-on: ubuntu-24.04
container:
image: nvidia/cuda:12.6.3-devel-ubuntu22.04
steps:
- name: Fail if path filter failed
if: needs.check-paths.result != 'success'
run: exit 1
- name: Install system dependencies
run: |
apt-get update && apt-get install -y git python3 python3-pip libaio-dev ninja-build
ln -sf /usr/bin/python3 /usr/bin/python
- uses: actions/checkout@v4
- name: Install PyTorch
run: |
pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu126
- name: environment
run: |
which python
python --version
python -c "import torch; print('torch:', torch.__version__, torch)"
#python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- name: Compile DeepSpeed Ops
run: |
DS_ACCELERATOR=cuda DS_ENABLE_NINJA=1 TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;8.9;9.0" DS_BUILD_OPS=1 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_GDS=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 DS_BUILD_DEEP_COMPILE=0 pip3 install .
- name: DS Report
run: |
DS_ACCELERATOR=cuda ds_report