未验证 提交 6a23850a 编写于 作者: Z Zhaolong Xing 提交者: GitHub

add init value to varis in analysis config. (#23442)

上级 1a8d6ee3
...@@ -526,20 +526,20 @@ struct AnalysisConfig { ...@@ -526,20 +526,20 @@ struct AnalysisConfig {
bool use_tensorrt_{false}; bool use_tensorrt_{false};
// For workspace_size, refer it from here: // For workspace_size, refer it from here:
// https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#troubleshooting // https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#troubleshooting
int tensorrt_workspace_size_; int tensorrt_workspace_size_{1 << 30};
// While TensorRT allows an engine optimized for a given max batch size // While TensorRT allows an engine optimized for a given max batch size
// to run at any smaller size, the performance for those smaller // to run at any smaller size, the performance for those smaller
// sizes may not be as well-optimized. Therefore, Max batch is best // sizes may not be as well-optimized. Therefore, Max batch is best
// equivalent to the runtime batch size. // equivalent to the runtime batch size.
int tensorrt_max_batchsize_; int tensorrt_max_batchsize_{1};
// We transform the Ops that can be converted into TRT layer in the model, // We transform the Ops that can be converted into TRT layer in the model,
// and aggregate these Ops into subgraphs for TRT execution. // and aggregate these Ops into subgraphs for TRT execution.
// We set this variable to control the minimum number of nodes in the // We set this variable to control the minimum number of nodes in the
// subgraph, 3 as default value. // subgraph, 3 as default value.
int tensorrt_min_subgraph_size_{3}; int tensorrt_min_subgraph_size_{3};
Precision tensorrt_precision_mode_; Precision tensorrt_precision_mode_{Precision::kFloat32};
bool trt_use_static_engine_; bool trt_use_static_engine_{false};
bool trt_use_calib_mode_; bool trt_use_calib_mode_{true};
std::map<std::string, std::vector<int>> min_input_shape_{}; std::map<std::string, std::vector<int>> min_input_shape_{};
std::map<std::string, std::vector<int>> max_input_shape_{}; std::map<std::string, std::vector<int>> max_input_shape_{};
std::map<std::string, std::vector<int>> optim_input_shape_{}; std::map<std::string, std::vector<int>> optim_input_shape_{};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册