Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Propagate build option for CUDA minimal to TRT #20695

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gedoensmax
Copy link
Contributor

Description

Extend cuda minimal option to TRT provider, as with TRT 10 no linking to cuDNN is required anymore
.
Besides that with the new engine dump feature it is also possible to embed an engine in to an ONNX and not ship a builder lib.
In addition to that this has roughly the same deserialization time/session setup time that using TRT standalone has.

Motivation and Context

exe_builder_lib\onnxruntime_perf_test.exe -I -e tensorrt -r 5 -i 'trt_engine_cache_enable|1 trt_timing_cache_enable|1 trt_dump_ep_context_model|1 trt_weightless_engine_enable|1' model.onnx


exe_no_builder_lib\onnxruntime_perf_test.exe -I -e tensorrt -r 5 -i 'trt_engine_cache_enable|1 trt_timing_cache_enable|1 trt_dump_ep_context_model|1 trt_weightless_engine_enable|1' model_ctx.onnx

@gedoensmax gedoensmax changed the base branch from main to yifanl/chi_trt10+dockerfile May 16, 2024 09:03
@gedoensmax
Copy link
Contributor Author

@chilo-ms and @yf711 for review

@chilo-ms
Copy link
Contributor

Can you rebase it to main?
main now has all the CI settings to run TRT 10

@jywu-msft jywu-msft requested review from chilo-ms and yf711 May 16, 2024 21:47
@gedoensmax gedoensmax requested a review from a team as a code owner May 17, 2024 09:36
@gedoensmax gedoensmax changed the base branch from yifanl/chi_trt10+dockerfile to main May 17, 2024 09:36
@gedoensmax
Copy link
Contributor Author

@chilo-ms Sure, done.

@chilo-ms
Copy link
Contributor

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, Linux QNN CI Pipeline

@chilo-ms
Copy link
Contributor

/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows ARM64 QNN CI Pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, ONNX Runtime React Native CI Pipeline, Windows x64 QNN CI Pipeline

@chilo-ms
Copy link
Contributor

/azp run Linux MIGraphX CI Pipeline, orttraining-amd-gpu-ci-pipeline

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link

Azure Pipelines successfully started running 9 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 9 pipeline(s).

file(GLOB_RECURSE onnxruntime_providers_cuda_cu_srcs CONFIGURE_DEPENDS
"${ONNXRUNTIME_ROOT}/core/providers/cuda/*.cu"
"${ONNXRUNTIME_ROOT}/core/providers/cuda/*.cuh"
)
else()
set(onnxruntime_providers_cuda_cu_srcs
"${ONNXRUNTIME_ROOT}/core/providers/cuda/math/unary_elementwise_ops_impl.cu"
Copy link
Contributor

@chilo-ms chilo-ms May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we need to include unary_elementwise_impl.cuh as well?
The definition of UnaryElementWiseImpl() is in that file and used by cuda::Impl_Cast<SrcT, DstT> which TRT EP will call to cast DOUBLE <- -> FLOAT or INT64 <-->INT32.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The include should be added as the inlclude directory is set correctly. If you want I can add it to sources, but usually this is not the case in CMake I would say.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah true, then no need to add it to sources

@snnn snnn requested a review from jywu-msft June 4, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants