-
Notifications
You must be signed in to change notification settings - Fork 1
Build, Test, and CI
FindHao edited this page Aug 31, 2025
·
6 revisions
-
1. Install Dependencies: Before the first build, run
./install_third_party.shto download NVBit. -
2. Compile:
make -jbuildslib/cutracer.sofor all supported architectures by default. - For a faster, targeted build, you can specify an architecture, e.g.,
make ARCH=sm_90. -
inject_funcs.cuis compiled with special flags;ptxasversion gates may alter-maxrregcount.
- C++ baseline and injected run:
tests/vectoradd - Python Triton/Proton example:
tests/proton_tests - Hang detection example:
tests/hang_test
Example commands
# Build tool
cd /home/findhao/d/CUTracer && make -j
# VectorAdd (no CUTracer)
cd /home/findhao/d/CUTracer/tests/vectoradd && make && ./vectoradd
# Triton/Proton histogram collection
cd /home/findhao/d/CUTracer/tests/proton_tests
CUDA_INJECTION64_PATH=/home/findhao/d/CUTracer/lib/cutracer.so \
CUTRACER_ANALYSIS=proton_instr_histogram \
KERNEL_FILTERS=add_kernel \
python ./vector-add-instrumented.py
# Clean Chrome trace (no CUTracer)
python ./vector-add-instrumented.py
# Merge for IPC
python /home/findhao/d/CUTracer/scripts/parse_instr_hist_trace.py \
--chrome-trace ./vector.chrome_trace \
--cutracer-trace ./kernel_*_add_kernel_hist.csv \
--cutracer-log ./cutracer_main_*.log \
--output vectoradd_ipc.csv
# Hang detection (intentional loop kernel)
cd /home/findhao/d/CUTracer/tests/hang_test
CUDA_INJECTION64_PATH=/home/findhao/d/CUTracer/lib/cutracer.so \
CUTRACER_ANALYSIS=deadlock_detection \
python ./test_hang.pyKey validations in tests:
- CUTracer run creates kernel log and matches CTA/warp EXIT lines
- Histogram CSV header:
warp_id,region_id,instruction,count - Generated IPC CSV has more than a minimal number of lines
- Project CI configuration may vary by environment. Use the local tests above to validate functionality.