mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 13:41:30 +08:00
Fix runtime initialize (#156)
Fix runtime Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -246,7 +246,7 @@ bool Runtime::Init(const RuntimeOption& _option) {
|
|||||||
option.backend = Backend::PDINFER;
|
option.backend = Backend::PDINFER;
|
||||||
} else if (IsBackendAvailable(Backend::OPENVINO)) {
|
} else if (IsBackendAvailable(Backend::OPENVINO)) {
|
||||||
option.backend = Backend::OPENVINO;
|
option.backend = Backend::OPENVINO;
|
||||||
} {
|
} else {
|
||||||
FDERROR << "Please define backend in RuntimeOption, current it's "
|
FDERROR << "Please define backend in RuntimeOption, current it's "
|
||||||
"Backend::UNKNOWN."
|
"Backend::UNKNOWN."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@@ -273,7 +273,8 @@ bool Runtime::Init(const RuntimeOption& _option) {
|
|||||||
CreatePaddleBackend();
|
CreatePaddleBackend();
|
||||||
FDINFO << "Runtime initialized with Backend::PDINFER." << std::endl;
|
FDINFO << "Runtime initialized with Backend::PDINFER." << std::endl;
|
||||||
} else if (option.backend == Backend::OPENVINO) {
|
} else if (option.backend == Backend::OPENVINO) {
|
||||||
FDASSERT(option.device == Device::CPU, "Backend::OPENVINO only supports Device::CPU");
|
FDASSERT(option.device == Device::CPU,
|
||||||
|
"Backend::OPENVINO only supports Device::CPU");
|
||||||
CreateOpenVINOBackend();
|
CreateOpenVINOBackend();
|
||||||
FDINFO << "Runtime initialized with Backend::OPENVINO." << std::endl;
|
FDINFO << "Runtime initialized with Backend::OPENVINO." << std::endl;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user