mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-15 05:01:00 +08:00
[Serving] Add trt workspace_size option for serving (#1963)
add workspace_size option Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
This commit is contained in:
6
serving/src/fastdeploy_runtime.cc
Normal file → Executable file
6
serving/src/fastdeploy_runtime.cc
Normal file → Executable file
@@ -313,6 +313,12 @@ ModelState::ModelState(TRITONBACKEND_Model* triton_model)
|
|||||||
// THROW_IF_BACKEND_MODEL_ERROR(ParseUnsignedLongLongValue(
|
// THROW_IF_BACKEND_MODEL_ERROR(ParseUnsignedLongLongValue(
|
||||||
// value_string,
|
// value_string,
|
||||||
// &runtime_options_->trt_max_workspace_size));
|
// &runtime_options_->trt_max_workspace_size));
|
||||||
|
} else if (param_key == "workspace_size") {
|
||||||
|
int max_workspace_size = 1 << 30;
|
||||||
|
THROW_IF_BACKEND_MODEL_ERROR(
|
||||||
|
ParseIntValue(value_string, &max_workspace_size));
|
||||||
|
runtime_options_->trt_option.max_workspace_size =
|
||||||
|
max_workspace_size;
|
||||||
} else if (param_key == "cache_file") {
|
} else if (param_key == "cache_file") {
|
||||||
runtime_options_->trt_option.serialize_file = value_string;
|
runtime_options_->trt_option.serialize_file = value_string;
|
||||||
} else if (param_key == "use_paddle") {
|
} else if (param_key == "use_paddle") {
|
||||||
|
Reference in New Issue
Block a user