[Serving]: add ipu support for serving. (#10) (#470)

* feat(ipu): add ipu docker for serving. (#10)

* feat(ipu): add ipu docker for serving.

* feat(ipu): enable ipu docker in serving.

* fix(): fix typo and issues in IPU.

* remove unused env path.

* doc(ipu): add ipu docker build doc and fix typo.

* fix(): clean apt cache in docker.

* fix(ipu): fix typo.
This commit is contained in:
czr-gc
2022-11-02 09:50:58 +08:00
committed by GitHub
parent 5a1059ca11
commit da84da7448
4 changed files with 149 additions and 3 deletions

View File

@@ -238,6 +238,8 @@ ModelState::ModelState(TRITONBACKEND_Model* triton_model)
runtime_options_->SetPaddleMKLDNN(pd_enable_mkldnn);
} else if (param_key == "use_paddle_log") {
runtime_options_->EnablePaddleLogInfo();
} else if (param_key == "use_ipu") {
runtime_options_->UseIpu();
}
}
}
@@ -384,7 +386,10 @@ TRITONSERVER_Error* ModelState::LoadModel(
runtime_options_->UseCpu();
}
#else
runtime_options_->UseCpu();
if (runtime_options_->device != fastdeploy::Device::IPU) {
// If Device is set to IPU, just skip CPU setting.
runtime_options_->UseCpu();
}
#endif // TRITON_ENABLE_GPU
*runtime = new fastdeploy::Runtime();