mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
[Backend & Serving] Serving and Runtime support Clone (#464)
* Add Serving and Runtime use Clone * support TRT, OpenVINO and Paddle Backend Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "fastdeploy/backends/common/multiclass_nms.h"
|
||||
#include "fastdeploy/core/fd_tensor.h"
|
||||
#include "fastdeploy/core/fd_type.h"
|
||||
|
||||
namespace fastdeploy {
|
||||
|
||||
@@ -63,6 +64,11 @@ class BaseBackend {
|
||||
virtual std::vector<TensorInfo> GetOutputInfos() = 0;
|
||||
virtual bool Infer(std::vector<FDTensor>& inputs,
|
||||
std::vector<FDTensor>* outputs) = 0;
|
||||
virtual std::unique_ptr<BaseBackend> Clone(void *stream = nullptr,
|
||||
int device_id = -1) {
|
||||
FDERROR << "Clone no support" << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace fastdeploy
|
||||
|
Reference in New Issue
Block a user