Merge branch 'develop' into set_stream_infer-shareExData

This commit is contained in:
Wang Bojun
2023-02-14 14:23:33 +08:00
committed by GitHub
14 changed files with 385 additions and 253 deletions

View File

@@ -59,6 +59,12 @@ struct FASTDEPLOY_DECL RuntimeOption {
const std::string& params_buffer = "",
const ModelFormat& format = ModelFormat::PADDLE);
/** \brief When loading encrypted model, encryption_key is required to decrypte model
*
* \param[in] encryption_key The key for decrypting model
*/
void SetEncryptionKey(const std::string& encryption_key);
/// Use cpu to inference, the runtime will inference on CPU by default
void UseCpu();
/// Use Nvidia GPU to inference
@@ -179,6 +185,8 @@ struct FASTDEPLOY_DECL RuntimeOption {
/// format of input model
ModelFormat model_format = ModelFormat::PADDLE;
std::string encryption_key_ = "";
// for cpu inference
// default will let the backend choose their own default value
int cpu_thread_num = -1;