HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tensorrt_provider_options.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 
4 #pragma once
5 
6 /// <summary>
7 /// Options for the TensorRT provider that are passed to SessionOptionsAppendExecutionProvider_TensorRT_V2.
8 /// Please note that this struct is *similar* to OrtTensorRTProviderOptions but only to be used internally.
9 /// Going forward, new trt provider options are to be supported via this struct and usage of the publicly defined
10 /// OrtTensorRTProviderOptions will be deprecated over time.
11 /// User can only get the instance of OrtTensorRTProviderOptionsV2 via CreateTensorRTProviderOptions.
12 /// </summary>
14  int device_id; // cuda device id.
15  int has_user_compute_stream; // indicator of user specified CUDA compute stream.
16  void* user_compute_stream; // user specified CUDA compute stream.
17  int trt_max_partition_iterations; // maximum iterations for TensorRT parser to get capability
18  int trt_min_subgraph_size; // minimum size of TensorRT subgraphs
19  size_t trt_max_workspace_size; // maximum workspace size for TensorRT.
20  int trt_fp16_enable; // enable TensorRT FP16 precision. Default 0 = false, nonzero = true
21  int trt_int8_enable; // enable TensorRT INT8 precision. Default 0 = false, nonzero = true
22  const char* trt_int8_calibration_table_name; // TensorRT INT8 calibration table name.
23  int trt_int8_use_native_calibration_table; // use native TensorRT generated calibration table. Default 0 = false, nonzero = true
24  int trt_dla_enable; // enable DLA. Default 0 = false, nonzero = true
25  int trt_dla_core; // DLA core number. Default 0
26  int trt_dump_subgraphs; // dump TRT subgraph. Default 0 = false, nonzero = true
27  int trt_engine_cache_enable; // enable engine caching. Default 0 = false, nonzero = true
28  const char* trt_engine_cache_path; // specify engine cache path
29  int trt_engine_decryption_enable; // enable engine decryption. Default 0 = false, nonzero = true
30  const char* trt_engine_decryption_lib_path; // specify engine decryption library path
31  int trt_force_sequential_engine_build; // force building TensorRT engine sequentially. Default 0 = false, nonzero = true
32  int trt_context_memory_sharing_enable; // enable context memory sharing between subgraphs. Default 0 = false, nonzero = true
33  int trt_layer_norm_fp32_fallback; // force Pow + Reduce ops in layer norm to FP32. Default 0 = false, nonzero = true
34 };
Options for the TensorRT provider that are passed to SessionOptionsAppendExecutionProvider_TensorRT_V...