Skip to content

Commit 658f82e

Browse files
committed
added nsight profiling to phoenix benchmark cases
1 parent 0900648 commit 658f82e

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/bench.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,31 @@ jobs:
9292
(cd pr && . ./mfc.sh load -c ${{ matrix.flag }} -m g)
9393
(cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml)
9494
95+
- name: Process Nsight Profiling Report
96+
run: |
97+
if [ -f "pr/report.nsys-rep" ]; then
98+
echo "=== Nsight Profiling Summary ==="
99+
echo "Master"
100+
(cd master && nsys stats --report nvtx_sum report.nsys-rep)
101+
echo "Pr"
102+
(cd pr && nsys stats --report nvtx_sum report.nsys-rep)
103+
104+
echo "=== CUDA API CALLS ==="
105+
echo "Master"
106+
(cd master && nsys stats --report cuda_api_sum --format table report.nsys-rep | head -100)
107+
echo "Pr"
108+
(cd pr && nsys stats --report cuda_api_sum --format table report.nsys-rep | head -100)
109+
110+
echo "=== GPU KERNELS ==="
111+
echo "Master"
112+
(cd master && nsys stats --report cuda_gpu_kern_sum --format table report.nsys-rep | head -100)
113+
echo "Pr"
114+
(cd pr && nsys stats --report cuda_gpu_kern_sum --format table report.nsys-rep | head -100)
115+
116+
else
117+
echo "No Nsight report found, skipping profiling analysis"
118+
fi
119+
95120
- name: Print Logs
96121
if: always()
97122
run: |
@@ -106,5 +131,6 @@ jobs:
106131
path: |
107132
pr/bench-${{ matrix.device }}.*
108133
pr/build/benchmarks/*
134+
pr/report.nsys-rep
109135
master/bench-${{ matrix.device }}.*
110136
master/build/benchmarks/*

.github/workflows/phoenix/bench.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ mkdir -p $currentdir
1616
export TMPDIR=$currentdir
1717

1818
if [ "$job_device" = "gpu" ]; then
19-
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
19+
nsys profile -o report ./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
2020
else
21-
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
21+
nsys profile -o report ./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
2222
fi
2323

2424
sleep 10

0 commit comments

Comments
 (0)