[Backend] support ipu in paddle inference backend. (#437)

* feat(ipu): add ipu support for paddle_infer backend.

* fix(): remove unused env.

* fix(ipu): simplify user API for IPU.

* fix(cmake): fix merge conflict error in CMakeList.

Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
czr-gc
2022-10-30 18:59:59 +08:00
committed by GitHub
parent ee2c6136fc
commit ede59af857
23 changed files with 457 additions and 115 deletions

View File

@@ -35,6 +35,9 @@ class FASTDEPLOY_DECL FastDeployModel {
/** Model's valid gpu backends. This member defined all the gpu backends have successfully tested for the model
*/
std::vector<Backend> valid_gpu_backends = {Backend::ORT};
/** Model's valid ipu backends. This member defined all the ipu backends have successfully tested for the model
*/
std::vector<Backend> valid_ipu_backends = {Backend::PDINFER};
/// Get number of inputs for this model
virtual int NumInputsOfRuntime() { return runtime_->NumInputs(); }
/// Get number of outputs for this model
@@ -95,6 +98,7 @@ class FASTDEPLOY_DECL FastDeployModel {
virtual bool InitRuntime();
virtual bool CreateCpuBackend();
virtual bool CreateGpuBackend();
virtual bool CreateIpuBackend();
bool initialized = false;
std::vector<Backend> valid_external_backends;