mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-11-03 02:53:26 +08:00
Add OpenVINO backend support (#148)
* Add OpenVINO backend support * fix pybind * fix python library path
This commit is contained in:
@@ -26,31 +26,8 @@ bool FastDeployModel::InitRuntime() {
|
||||
return false;
|
||||
}
|
||||
if (runtime_option.backend != Backend::UNKNOWN) {
|
||||
if (runtime_option.backend == Backend::ORT) {
|
||||
if (!IsBackendAvailable(Backend::ORT)) {
|
||||
FDERROR
|
||||
<< "Backend::ORT is not complied with current FastDeploy library."
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
} else if (runtime_option.backend == Backend::TRT) {
|
||||
if (!IsBackendAvailable(Backend::TRT)) {
|
||||
FDERROR
|
||||
<< "Backend::TRT is not complied with current FastDeploy library."
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
} else if (runtime_option.backend == Backend::PDINFER) {
|
||||
if (!IsBackendAvailable(Backend::PDINFER)) {
|
||||
FDERROR << "Backend::PDINFER is not compiled with current FastDeploy "
|
||||
"library."
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
FDERROR
|
||||
<< "Only support Backend::ORT / Backend::TRT / Backend::PDINFER now."
|
||||
<< std::endl;
|
||||
if (!IsBackendAvailable(runtime_option.backend)) {
|
||||
FDERROR << Str(runtime_option.backend) << " is not compiled with current FastDeploy library." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user