Development Verification
- Set the Paddle Inference product path.
1 2
export PADDLE_INFERENCE_DIR=$(pwd)/paddle_inference_install_dir export LD_LIBRARY_PATH=${PADDLE_INFERENCE_DIR}/paddle/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH:-}
- Check the product and version information.
1 2 3 4 5
test -f ${PADDLE_INFERENCE_DIR}/paddle/include/paddle_inference_api.h test -f ${PADDLE_INFERENCE_DIR}/paddle/lib/libpaddle_inference.so find ${PADDLE_INFERENCE_DIR}/paddle/lib -maxdepth 1 -type f \ -name 'libpaddle_inference*' | sort cat ${PADDLE_INFERENCE_DIR}/version.txt
The expected output is as follows.1 2 3 4 5
libpaddle_inference.a libpaddle_inference.so WITH_GPU: ON CUDA version: 13.0 CUDNN version: v9.21
- Compile the minimum C++ GPU configuration verification program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
cat > paddle_infer_min.cc <<'CPP' #include <iostream> #include "paddle_inference_api.h" int main() { paddle_infer::Config config; config.EnableUseGpu(100, 0); std::cout << "paddle_inference_gpu_config=ok" << std::endl; return 0; } CPP g++ -std=c++17 paddle_infer_min.cc \ -I${PADDLE_INFERENCE_DIR}/paddle/include \ -L${PADDLE_INFERENCE_DIR}/paddle/lib \ -lpaddle_inference \ -Wl,-rpath,${PADDLE_INFERENCE_DIR}/paddle/lib \ -o paddle_infer_min ./paddle_infer_min
The expected output is as follows.1paddle_inference_gpu_config=ok
The pass criteria are as follows.
- The inference_lib_dist is successfully built.
- The paddle_inference_install_dir and paddle_inference_c_install_dir are successfully generated.
- The version.txt file displays WITH_GPU: ON, CUDA version: 13.0, and CUDNN version: v9.21.
- The minimum C++ program is successfully compiled and the output is paddle_inference_gpu_config=ok.
Parent topic: Developer Guide