troubleshooting/build-scripts-troubleshooting/README.md
This directory contains specialized build scripts for debugging various aspects of libnd4j. Each script is configured with specific debug flags for different debugging scenarios.
build-cpu-backend-full-debug.sh
build-cpu-backend-preprocessor-debug.sh
build-cpu-backend-valgrind-debug.sh
build-cpu-backend-onednn-debug.sh
build-cuda-backend-full-debug.sh
build-cuda-backend-compute-sanitizer.sh
General Debug Builds
# For CPU debugging
./build-cpu-backend-full-debug.sh
# For CUDA debugging
./build-cuda-backend-full-debug.sh
Macro Debugging
./build-cpu-backend-preprocessor-debug.sh
# Check preprocessed files in the preprocessed/ directory
Memory Analysis
# For CPU with Valgrind
./build-cpu-backend-valgrind-debug.sh
# For CUDA with Compute Sanitizer
./build-cuda-backend-compute-sanitizer.sh
The scripts use various combinations of these debug flags:
libnd4j.build=debug: Enables debug symbolslibnd4j.calltrace=ON: Enables function call tracinglibnd4j.printmath=ON: Prints math operationslibnd4j.printindices=ON: Prints array indiceslibnd4j.sanitize=ON: Enables sanitizer supportlibnd4j.preprocess=ON: Enables preprocessor outputlibnd4j.keepnvcc=ON: Preserves NVCC output (CUDA)