onnxruntime: [Build] ONNX Runtime build fails OOM (v1.20.x)
Describe the issue
Getting issue trying to compile against rel-1.20.0 branch.
We are getting out of memory issue, for both Linux and Windows platforms.
windows config (64GB RAM):
BUILDTOOLS_VERSION:17.12.35506.116
CMAKE_VERSION:3.30.5
CUDA_VERSION:12.6.2
CUDNN_VERSION:9.5.1.17
PYTHON_VERSION:3.12.3
TENSORRT_VERSION:10.6.0.26
VCPGK_VERSION:2024.03.19
LInux (64GB RAM):
CMAKE_VERSION:3.28.3
CUDA_VERSION:12.6.2
CUDNN_VERSION:9.5.1.17
PYTHON_VERSION:3.12.3
TENSORRT_VERSION:10.6.0.26
Urgency
ASAP
Target platform
Linux, Windows
Build script
Windows:
onnxruntime/tools/ci_build/build.py `
--cmake_generator "Visual Studio 17 2022" `
--config Release `
--cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75;80;86;90" `
--skip_submodule_sync `
--parallel `
--build_shared_lib `
--compile_no_warning_as_error `
--skip_tests `
--update `
--build `
--build_dir /workspace/build `
--use_cuda `
--cuda_home ${env:CUDA_PATH} `
--cudnn_home ${env:CUDA_PATH} `
--use_tensorrt --tensorrt_home "/tensorrt" ; `
linux:
./build.sh \
--config Release \
--skip_submodule_sync \
--parallel \
--build_shared_lib \
--compile_no_warning_as_error \
--build_dir /workspace/build \
--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='75;80;86;90' \
--update \
--build \
--use_cuda \
--cuda_home "/usr/local/cuda" \
--cudnn_home "/usr" \
--use_tensorrt \
--use_tensorrt_builtin_parser \
--tensorrt_home "/usr/src/tensorrt" \
--allow_running_as_root \
--use_openvino CPU
Error / output
No error, container fails out of memory.
Visual Studio Version
No response
GCC / Compiler Version
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 18 (18 by maintainers)
Estimated memory usage is nvcc_threads * parallel * 8GB so you will need at least 16 GB memory for
--parallel 2 --nvcc_threads 1. Otherwise, try--parallel 1 --nvcc_threads 1. If you do not set them, nvcc_threads=parallel=vCPU=2, so you will need 32GB.