mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-15 21:20:53 +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;
|
||||
} else if (IsBackendAvailable(Backend::OPENVINO)) {
|
||||
option.backend = Backend::OPENVINO;
|
||||
} {
|
||||
} else {
|
||||
FDERROR << "Please define backend in RuntimeOption, current it's "
|
||||
"Backend::UNKNOWN."
|
||||
<< std::endl;
|
||||
@@ -273,7 +273,8 @@ bool Runtime::Init(const RuntimeOption& _option) {
|
||||
CreatePaddleBackend();
|
||||
FDINFO << "Runtime initialized with Backend::PDINFER." << std::endl;
|
||||
} 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();
|
||||
FDINFO << "Runtime initialized with Backend::OPENVINO." << std::endl;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user