Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
177 lines (134 loc) · 6.9 KB
/
Copy pathjustfile
File metadata and controls
177 lines (134 loc) · 6.9 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
set shell := ["bash", "-cu"]
cuda_smoke_image := "nvcr.io/nvidia/cuda:13.3.0-base-ubuntu24.04@sha256:bcf7d05f0b13b9bbb86d9a4cd039d331894b8f1145ad009d1af75023bcd1dc5c"
cuda12_devel_image := "nvidia/cuda:12.9.1-devel-ubuntu24.04@sha256:020bc241a628776338f4d4053fed4c38f6f7f3d7eb5919fecb8de313bb8ba47c"
cuda12_compat_build_image := "nvidia/cuda:12.9.1-devel-ubuntu22.04@sha256:bd4e2680a261c212f1e2fea241606f71497dc67a417f73175d794ec8212b5ba8"
cuda12_min_devel_image := "nvidia/cuda:12.0.1-devel-ubuntu22.04@sha256:0632323ec456b33654d489f3ddd336f3b3ea1c87e6421a91a37f6768e659f08c"
cuda13_devel_image := "nvcr.io/nvidia/cuda:13.3.0-devel-ubuntu24.04@sha256:69e9e39eb8fe2cda271654a0f5eac2f1bb946b2fb9c460eb19c7c3c155f4e64e"
pytorch_image := "nvcr.io/nvidia/pytorch:25.06-py3@sha256:3cb18e2c438db8af2d3a659ca27fac5da328640261c38c48a34edcd223c38af9"
default:
@just --list
build:
cargo build --workspace
cmake -S . -B build -G Ninja
cmake --build build
test: build
cargo test --workspace
ctest --test-dir build --output-on-failure
python3 tests/agent-contract/test_contract.py target/debug/xprobe
python3 tests/agent-contract/test_trace_analysis.py
python3 tests/agent-contract/test_multi_process_workflow.py
python3 tests/agent-contract/test_workflow_routes.py
test-agent-contract: build
python3 tests/agent-contract/test_contract.py target/debug/xprobe
python3 tests/agent-contract/test_trace_analysis.py
python3 tests/agent-contract/test_multi_process_workflow.py
python3 tests/agent-contract/test_workflow_routes.py
test-skill-install:
tests/agent-contract/test_skill_install.sh
test-install:
sh -n install.sh tests/install/test_install.sh
bash -n scripts/check-glibc-ceiling.sh scripts/verify-public-release.sh tests/install/test_glibc_ceiling.sh tests/install/test_wheel.sh
python3 -I -m py_compile scripts/build-wheel.py
python3 tests/install/test_release_sbom.py
tests/install/test_glibc_ceiling.sh
tests/install/test_install.sh
test-bpf:
cmake -S . -B build -G Ninja -DXPROBE_BUILD_BPF=ON
cmake --build build --target xprobe-bpf
test-bpf-live: build
python3 tests/integration/test_uprobe.py "{{cuda_smoke_image}}"
python3 tests/integration/test_linux.py "{{cuda_smoke_image}}"
test-cpu-live: build
cargo test -p xprobe-cli --test cpu_sampling -- --ignored --test-threads=1
test-cupti:
cmake -S . -B build -G Ninja -DXPROBE_BUILD_CUPTI=ON
cmake --build build --target xprobe-cupti-smoke
ctest --test-dir build --output-on-failure -R cupti
test-cupti-live: build
python3 tests/integration/test_cupti.py "{{cuda13_devel_image}}" target/debug/xprobe
test-cupti-live-cuda12: build
python3 tests/integration/test_cupti.py "{{cuda12_devel_image}}" target/debug/xprobe
test-cupti-live-cuda12-min: build
python3 tests/integration/test_cuda12_compat.py "{{cuda12_compat_build_image}}" "{{cuda12_min_devel_image}}" target/debug/xprobe
test-injection-live: build
python3 tests/integration/test_inject.py "{{cuda13_devel_image}}"
test-injection-live-cuda12: build
python3 tests/integration/test_inject.py "{{cuda12_devel_image}}"
test-cupti-burst-live: build
python3 tests/integration/test_cupti_burst.py "{{cuda13_devel_image}}" 50000
test-cupti-burst-live-cuda12: build
python3 tests/integration/test_cupti_burst.py "{{cuda12_devel_image}}" 50000
test-multisource-live: build
python3 tests/integration/test_multisource.py "{{cuda13_devel_image}}" target/debug/xprobe
test-python-sample-live: build
python3 tests/integration/test_python_sample.py
test-trigger-live: build
python3 tests/integration/test_trigger.py "{{cuda13_devel_image}}" target/debug/xprobe
test-multisource-live-cuda12: build
python3 tests/integration/test_multisource.py "{{cuda12_devel_image}}" target/debug/xprobe
test-pytorch-symbols: build
python3 tests/integration/test_pytorch_symbols.py --python "${PYTORCH_PYTHON:?set PYTORCH_PYTHON to a Python with torch}"
test-pytorch-live: build
if [[ -n "${PYTORCH_ENV:-}" ]]; then python3 tests/integration/test_pytorch.py "{{cuda_smoke_image}}" "${PYTORCH_ENV}"; else python3 tests/integration/test_pytorch.py "{{pytorch_image}}"; fi
test-pytorch-cuda-live: build
if [[ -n "${PYTORCH_ENV:-}" ]]; then python3 tests/integration/test_pytorch_cuda.py --image "{{cuda12_devel_image}}" --pytorch-env "${PYTORCH_ENV}"; else python3 tests/integration/test_pytorch_cuda.py --image "{{pytorch_image}}"; fi
test-triage-live: build
if [[ -n "${PYTORCH_ENV:-}" ]]; then python3 tests/integration/test_triage.py --image "{{cuda12_devel_image}}" --pytorch-env "${PYTORCH_ENV}"; else python3 tests/integration/test_triage.py --image "{{pytorch_image}}"; fi
test-nvtx-live: build
python3 tests/integration/test_nvtx.py --image "{{cuda13_devel_image}}"
test-nvtx-live-cuda12: build
python3 tests/integration/test_nvtx.py --image "{{cuda12_devel_image}}"
test-release-live:
[[ -n "${PYTORCH_ENV:-}" ]] || { echo "set PYTORCH_ENV to an existing environment with PyTorch" >&2; exit 2; }
just test-bpf-live
just test-cpu-live
just test-cupti-live-cuda12
just test-cupti-burst-live-cuda12
just test-nvtx-live-cuda12
just test-cupti-live-cuda12-min
just test-injection-live-cuda12
just test-multisource-live-cuda12
just test-cupti-live
just test-cupti-burst-live
just test-nvtx-live
just test-injection-live
just test-multisource-live
just test-trigger-live
just test-python-sample-live
just test-pytorch-live
just test-pytorch-cuda-live
just test-triage-live
just benchmark-gpu
just benchmark-aggregate
just benchmark-multiprocess
just benchmark-pytorch
just benchmark-cpu
benchmark-gpu:
python3 benchmarks/cuda-callback/run.py "{{cuda13_devel_image}}"
benchmark-aggregate:
python3 benchmarks/cuda-aggregate/run.py "{{cuda13_devel_image}}"
benchmark-multiprocess:
python3 benchmarks/cuda-multiprocess/run.py "{{cuda13_devel_image}}"
benchmark-pytorch: build
if [[ -n "${PYTORCH_ENV:-}" ]]; then python3 benchmarks/pytorch/run.py --image "{{cuda12_devel_image}}" --pytorch-env "${PYTORCH_ENV}"; else python3 benchmarks/pytorch/run.py --image "{{pytorch_image}}"; fi
benchmark-python-sampling: build
python3 benchmarks/python-sampling/run.py
benchmark-cpu: build
python3 benchmarks/cpu-inventory/run-container.py "{{cuda12_devel_image}}"
benchmark-cpu-host: build
python3 benchmarks/cpu-inventory/run.py
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all --check
# Commit messages on this branch that are not on master yet.
lint-commits range="origin/master..HEAD":
gitlint --commits {{range}}
lint:
cargo clippy --workspace --all-targets -- -D warnings
schemas:
cargo run --package xprobe-protocol --bin generate-schemas
package:
scripts/package-release.sh
gpu-smoke:
docker run --rm --runtime=nvidia --gpus all {{cuda_smoke_image}} nvidia-smi --query-gpu=name,driver_version,compute_cap --format=csv,noheader