[Serving]support encryt (#1349)

* serving support encryt

* Update fastdeploy_runtime.cc
This commit is contained in:
heliqi
2023-02-17 15:29:57 +08:00
committed by GitHub
parent 6c13ab1f7e
commit 8f21d55e5c

View File

@@ -230,7 +230,10 @@ ModelState::ModelState(TRITONBACKEND_Model* triton_model)
ParseBoolValue(value_string, &pd_enable_mkldnn));
runtime_options_->SetPaddleMKLDNN(pd_enable_mkldnn);
} else if (param_key == "use_paddle_log") {
runtime_options_->EnablePaddleLogInfo();
bool use_paddle_log;
THROW_IF_BACKEND_MODEL_ERROR(
ParseBoolValue(value_string, &use_paddle_log));
runtime_options_->paddle_infer_option.enable_log_info = use_paddle_log;
} else if (param_key == "num_streams") {
int num_streams;
THROW_IF_BACKEND_MODEL_ERROR(
@@ -241,6 +244,8 @@ ModelState::ModelState(TRITONBACKEND_Model* triton_model)
ParseBoolValue(value_string, &is_clone_));
} else if (param_key == "use_ipu") {
// runtime_options_->UseIpu();
} else if (param_key == "encryption_key") {
runtime_options_->SetEncryptionKey(value_string);
}
}
}
@@ -312,10 +317,15 @@ ModelState::ModelState(TRITONBACKEND_Model* triton_model)
} else if (param_key == "use_paddle") {
runtime_options_->EnablePaddleToTrt();
} else if (param_key == "use_paddle_log") {
runtime_options_->EnablePaddleLogInfo();
bool use_paddle_log;
THROW_IF_BACKEND_MODEL_ERROR(
ParseBoolValue(value_string, &use_paddle_log));
runtime_options_->paddle_infer_option.enable_log_info = use_paddle_log;
} else if (param_key == "is_clone") {
THROW_IF_BACKEND_MODEL_ERROR(
ParseBoolValue(value_string, &is_clone_));
} else if (param_key == "encryption_key") {
runtime_options_->SetEncryptionKey(value_string);
}
}
}