File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,10 +24,13 @@ docker run --rm --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
2424docker run --rm --gpus all vk-bench --headless --frames 300 --out results.json
2525```
2626
27+
28+ Scripts default to Docker image ` vk-bench ` . Override with ` VK_BENCH_IMAGE=<image> ` if needed.
29+
2730### Bench all 3 scenes
2831
2932``` bash
30- scripts/run_bench.sh results
33+ scripts/run_bench.sh results # runs inside Docker image vk-bench
3134```
3235
3336## Example results
@@ -51,14 +54,15 @@ scripts/run_bench.sh results
5154## Nsight steps (exact command)
5255
5356``` bash
54- scripts/nsight_capture.sh results/nsight_capture
57+ scripts/nsight_capture.sh results/nsight_capture # profiles docker run
5558```
5659
5760Or directly:
5861
5962``` bash
6063nsys profile --trace=vulkan,nvtx,cuda --output results/nsight_capture \
61- vk-bench --headless --scene million-tris --warmup 20 --frames 120 --out results/nsight_capture.json
64+ docker run --rm --gpus all -v " $( pwd) /results:/results" vk-bench \
65+ --headless --scene million-tris --warmup 20 --frames 120 --out /results/nsight_capture.json
6266```
6367
6468![ Nsight capture screenshot] ( docs/nsight-capture.svg )
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4+ IMAGE=" ${VK_BENCH_IMAGE:- vk-bench} "
45OUT=" ${1:- results/ system_info.txt} "
56mkdir -p " $( dirname " $OUT " ) "
67
8+ if ! command -v docker > /dev/null 2>&1 ; then
9+ echo " docker is required for scripts/collect_system_info.sh" >&2
10+ exit 1
11+ fi
12+
713{
814 echo " == Date =="
915 date -Iseconds
1016 echo
1117 echo " == uname =="
1218 uname -a
1319 echo
14- echo " == nvidia-smi =="
20+ echo " == nvidia-smi (host) =="
1521 nvidia-smi || true
1622 echo
17- echo " == vulkaninfo --summary =="
18- vulkaninfo --summary || true
23+ echo " == vulkaninfo --summary (container) =="
24+ docker run --rm --gpus all " $IMAGE " vulkaninfo --summary || true
1925} > " $OUT "
2026
2127echo " Wrote $OUT "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4+ IMAGE=" ${VK_BENCH_IMAGE:- vk-bench} "
45OUT=" ${1:- results/ nsight_capture} "
56mkdir -p " $( dirname " $OUT " ) "
67
8+ if ! command -v docker > /dev/null 2>&1 ; then
9+ echo " docker is required for scripts/nsight_capture.sh" >&2
10+ exit 1
11+ fi
12+
713if ! command -v nsys > /dev/null 2>&1 ; then
8- echo " nsys not found. Install NVIDIA Nsight Systems to use this script." >&2
14+ echo " nsys not found on host . Install NVIDIA Nsight Systems to use this script." >&2
915 exit 1
1016fi
1117
1218nsys profile \
1319 --trace=vulkan,nvtx,cuda \
1420 --output " $OUT " \
15- vk-bench --headless --scene million-tris --warmup 20 --frames 120 --vsync 0 --out " ${OUT} .json"
21+ docker run --rm --gpus all \
22+ -v " $( pwd) /results:/results" \
23+ " $IMAGE " \
24+ --headless --scene million-tris --warmup 20 --frames 120 --vsync 0 --out /results/nsight_capture.json
1625
1726echo " Capture written to ${OUT} .qdrep (or .nsys-rep depending on version)."
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4+ IMAGE=" ${VK_BENCH_IMAGE:- vk-bench} "
45RESULT_DIR=" ${1:- results} "
56mkdir -p " $RESULT_DIR "
67
8+ if ! command -v docker > /dev/null 2>&1 ; then
9+ echo " docker is required for scripts/run_bench.sh" >&2
10+ exit 1
11+ fi
12+
713for scene in triangle million-tris compute-copy; do
8- echo " Running scene: $scene "
9- vk-bench --headless --scene " $scene " --warmup 30 --frames 300 --vsync 0 --out " $RESULT_DIR /${scene} .json"
14+ echo " Running scene in Docker: $scene "
15+ docker run --rm --gpus all \
16+ -v " $( pwd) /$RESULT_DIR :/results" \
17+ " $IMAGE " \
18+ --headless --scene " $scene " --warmup 30 --frames 300 --vsync 0 --out " /results/${scene} .json"
1019done
1120
1221echo " Saved benchmark outputs to $RESULT_DIR "
You can’t perform that action at this time.
0 commit comments