microsoft / microsoft/onnxruntime

[Build] Compilation error when building Onnxrt 1.20.1 with flag onnxruntime_CUDA_MINIMAL=ON with TRT 10.7.23 and Cudnn 9.6.0.74,

Open
#23,504 11 comments 0 reactions 1 assignee View on GitHub

@yf711 is already working on this.

Since Jan 27, 2025.

build ep:TensorRT
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the issue

wanted to try flag --cmake_extra_defines onnxruntime_CUDA_MINIMAL=ON on ONNXRT 1.20.1 after https://github.com/microsoft/onnxruntime/pull/22751
with latest TRT 10 and cudnn 9 and got compilation error with gcc11

### Urgency

my goal is to
1) minimize ONRT + TRT EP footprint : see issue https://github.com/microsoft/onnxruntime/issues/22960#issuecomment-2513586999 (medium)
2) upgrade from ORT 1.18.0 to ORT latest and TR10 to fix https://github.com/microsoft/onnxruntime/issues/17434 (High)

### Target platform

Linux (SLES15 SP6)

### Build script

CC=gcc-11 CXX=g++-11 ./build.sh \
--skip_submodule_sync --nvcc_threads 2 \
--config $ORT_BUILD_MODE --use_cuda \
--cudnn_home /usr/local/cuda/lib64 \
--cuda_home /usr/local/cuda/ \
--use_tensorrt --tensorrt_home /usr/local/TensorRT \
--build_shared_lib --parallel --skip_tests \
--allow_running_as_root \
--cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=89" \
--cmake_extra_defines onnxruntime_CUDA_MINIMAL=ON \
--cmake_extra_defines "CMAKE_CUDA_HOST_COMPILER=/usr/bin/gcc-11"

### Error / output

[ 46%] Building CXX object CMakeFiles/onnxruntime_providers_cuda.dir/tmp/onnxruntime/onnxruntime/core/providers/cuda/cudnn_common.cc.o
In file included from /tmp/onnxruntime/onnxruntime/core/providers/cuda/cudnn_common.h:12,
from /tmp/onnxruntime/onnxruntime/core/providers/cuda/cudnn_common.cc:9:
/tmp/onnxruntime/onnxruntime/core/providers/cuda/shared_inc/cudnn_fe_call.h:9:10: fatal error: cudnn_frontend.h: No such file or directory
9 | #include
| ^~~~~~~~~~~~~~~~~~

### Visual Studio Version

_No response_

### GCC / Compiler Version

gcc11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.