Repository navigation
144 lines (137 loc) · 5.63 KB
/
Copy pathci.yaml
File metadata and controls
144 lines (137 loc) · 5.63 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
132
133
134
135
136
137
138
139
140
141
142
143
144
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: "CI"
on:
push:
branches:
- "main"
- "pull-request/[0-9]+"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: "Running Lint"
run: |
pip install hatch
hatch run lint:check
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: "Building Docs"
run: |
pip install hatch
hatch run docs:build
test-ncu:
name: test-ncu (${{ matrix.platform.runner }})
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
pytorch_image: ["nvcr.io/nvidia/pytorch:26.09-py3"]
platform:
- runner: linux-amd64-gpu-h100-latest-1
ncu_installer_url: "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-compute/2026_2_1/nsight_compute-linux-x86_64-2026.2.1.6.run"
- runner: linux-arm64-gpu-l4-latest-1
ncu_installer_url: "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-compute/2026_2_1/nsight_compute-linux-sbsa-2026.2.1.6.run"
container:
image: ${{ matrix.pytorch_image }}
options: "--cap-add=SYS_ADMIN --gpus all"
steps:
- uses: actions/checkout@v5
- name: "Install NCU 2026.2.1.0 (CUDA 13.3 Update 1)"
run: |
curl -L -o ncu_installer.run "${{ matrix.platform.ncu_installer_url }}"
chmod +x ncu_installer.run
./ncu_installer.run -- -noprompt
rm ncu_installer.run
echo "/usr/local/NVIDIA-Nsight-Compute-2026.2" >> $GITHUB_PATH
- name: "Running Tests"
run: |
pip install hatch
hatch run test_cu13:run
test-cupti:
name: test-cupti (${{ matrix.platform.runner }})
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
pytorch_image: ["nvcr.io/nvidia/pytorch:26.09-py3"]
platform:
- runner: linux-amd64-gpu-h100-latest-1
- runner: linux-arm64-gpu-l4-latest-1
container:
image: ${{ matrix.pytorch_image }}
options: "--cap-add=SYS_ADMIN --gpus all"
steps:
- uses: actions/checkout@v5
- name: "Running Tests (CUPTI backend)"
run: |
pip install hatch
hatch run test_cu13:run -- --tool-init=cupti
test-ncu-windows:
name: test-ncu (windows-amd64-gpu-a100-latest-1)
runs-on: windows-amd64-gpu-a100-latest-1
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: "Install NCU 2026.3.0 (CUDA 13.4)"
shell: pwsh
run: |
curl.exe -fL -o ncu_installer.msi "https://developer.nvidia.com/downloads/assets/tools/secure/nsight-compute/2026_3_0/nsight_compute-windows-x86_64-2026.3.0.13.msi"
if ($LASTEXITCODE) { exit $LASTEXITCODE }
Start-Process msiexec.exe -Wait -ArgumentList '/i ncu_installer.msi /quiet /norestart'
Remove-Item ncu_installer.msi
"C:\Program Files\NVIDIA Corporation\Nsight Compute 2026.3.0" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: "Install MSVC Redistributable (required by torch)"
shell: pwsh
run: |
curl.exe -fL -o vc_redist.x64.exe https://aka.ms/vc14/vc_redist.x64.exe
if ($LASTEXITCODE) { exit $LASTEXITCODE }
Start-Process vc_redist.x64.exe -Wait -ArgumentList '/install /quiet /norestart'
Remove-Item vc_redist.x64.exe
- name: "Create hatch test environment"
shell: pwsh
run: |
pip install hatch
hatch env create test_cu13
- name: "Install PyTorch (CUDA 13.2)"
shell: pwsh
run: |
hatch run test_cu13:pip install torch --index-url https://download.pytorch.org/whl/cu132
- name: "Install cuTile"
shell: pwsh
run: |
hatch run test_cu13:pip install cuda-tile[tileiras]
- name: "Running Tests"
shell: pwsh
env:
# On Windows matplotlib defaults to the TkAgg backend, and tkinter
# is not properly configured on the runner. This is a headless
# runner and no GUI is required, so force the non-interactive
# backend. Headless Linux falls back to Agg already.
MPLBACKEND: Agg
# WAR for a known NCU issue on Windows: the Python process aborts
# with 0xC0000409 (FAIL_FAST_FATAL_APP_EXIT) at exit, after pytest
# has finished. Save pytest's own exit code before that happens and
# report it instead. Activate the test_cu13 hatch environment and run
# python directly rather than through `hatch run`: before Python
# 3.13.1, passing the 0xC0000409 exit code on through sys.exit() on
# Windows exits with -1 instead (https://github.com/python/cpython/pull/125896).
run: |
. (Join-Path (hatch env find test_cu13) 'Scripts\activate.ps1')
python -c "import pytest, sys; rc = int(pytest.main(['-v', '--junitxml=report.xml'])); open('pytest_rc.txt', 'w').write(str(rc)); sys.exit(rc)"
$code = $LASTEXITCODE
Write-Host ("python exit code: {0} (0x{0:X8})" -f $code)
if ($code -eq 0xC0000409 -and (Test-Path pytest_rc.txt)) {
$code = [int](Get-Content pytest_rc.txt)
Write-Host "Ignoring exit code 0xC0000409 (known NCU issue); pytest exit code: $code"
}
exit $code