mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-26 18:10:32 +08:00
fix conflicts for ascend
This commit is contained in:
@@ -48,6 +48,9 @@ class FASTDEPLOY_DECL FastDeployModel {
|
||||
/** Model's valid cann backends. This member defined all the cann backends have successfully tested for the model
|
||||
*/
|
||||
std::vector<Backend> valid_cann_backends = {};
|
||||
/** Model's valid KunlunXin xpu backends. This member defined all the KunlunXin xpu backends have successfully tested for the model
|
||||
*/
|
||||
std::vector<Backend> valid_xpu_backends = {};
|
||||
/** Model's valid hardware backends. This member defined all the gpu backends have successfully tested for the model
|
||||
*/
|
||||
std::vector<Backend> valid_rknpu_backends = {};
|
||||
@@ -115,6 +118,20 @@ class FASTDEPLOY_DECL FastDeployModel {
|
||||
std::vector<FDTensor>().swap(reused_output_tensors_);
|
||||
}
|
||||
|
||||
virtual fastdeploy::Runtime* CloneRuntime() {
|
||||
return runtime_->Clone();
|
||||
}
|
||||
|
||||
virtual bool SetRuntime(fastdeploy::Runtime* clone_runtime) {
|
||||
runtime_ = std::unique_ptr<Runtime>(clone_runtime);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual std::unique_ptr<FastDeployModel> Clone() {
|
||||
FDERROR << ModelName() << " doesn't support Cone() now." << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool InitRuntime();
|
||||
|
||||
@@ -132,10 +149,9 @@ class FASTDEPLOY_DECL FastDeployModel {
|
||||
bool CreateIpuBackend();
|
||||
bool CreateRKNPUBackend();
|
||||
bool CreateTimVXBackend();
|
||||
bool CreateXPUBackend();
|
||||
bool CreateCANNBackend();
|
||||
|
||||
std::shared_ptr<Runtime> runtime_;
|
||||
bool runtime_initialized_ = false;
|
||||
// whether to record inference time
|
||||
bool enable_record_time_of_runtime_ = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user