mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
[Other] Change all XPU to KunlunXin (#973)
* [FlyCV] Bump up FlyCV -> official release 1.0.0 * XPU to KunlunXin * update * update model link * update doc * update device * update code * useless code Co-authored-by: DefTruth <qiustudent_r@163.com> Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ wget https://bj.bcebos.com/paddlehub/fastdeploy/hrnet_demo.jpg
|
||||
./infer_tinypose_demo PP_TinyPose_256x192_infer hrnet_demo.jpg 1
|
||||
# GPU上TensorRT推理
|
||||
./infer_tinypose_demo PP_TinyPose_256x192_infer hrnet_demo.jpg 2
|
||||
# XPU推理
|
||||
# 昆仑芯XPU推理
|
||||
./infer_tinypose_demo PP_TinyPose_256x192_infer hrnet_demo.jpg 3
|
||||
```
|
||||
|
||||
|
@@ -53,13 +53,13 @@ void CpuInfer(const std::string& tinypose_model_dir,
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
void XpuInfer(const std::string& tinypose_model_dir,
|
||||
void KunlunXinInfer(const std::string& tinypose_model_dir,
|
||||
const std::string& image_file) {
|
||||
auto tinypose_model_file = tinypose_model_dir + sep + "model.pdmodel";
|
||||
auto tinypose_params_file = tinypose_model_dir + sep + "model.pdiparams";
|
||||
auto tinypose_config_file = tinypose_model_dir + sep + "infer_cfg.yml";
|
||||
auto option = fastdeploy::RuntimeOption();
|
||||
option.UseXpu();
|
||||
option.UseKunlunXin();
|
||||
auto tinypose_model = fastdeploy::vision::keypointdetection::PPTinyPose(
|
||||
tinypose_model_file, tinypose_params_file, tinypose_config_file, option);
|
||||
if (!tinypose_model.Initialized()) {
|
||||
@@ -163,7 +163,7 @@ int main(int argc, char* argv[]) {
|
||||
"e.g ./infer_model ./pptinypose_model_dir ./test.jpeg 0"
|
||||
<< std::endl;
|
||||
std::cout << "The data type of run_option is int, 0: run with cpu; 1: run "
|
||||
"with gpu; 2: run with gpu and use tensorrt backend; 3: run with xpu."
|
||||
"with gpu; 2: run with gpu and use tensorrt backend; 3: run with kunlunxin."
|
||||
<< std::endl;
|
||||
return -1;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ int main(int argc, char* argv[]) {
|
||||
} else if (std::atoi(argv[3]) == 2) {
|
||||
TrtInfer(argv[1], argv[2]);
|
||||
} else if (std::atoi(argv[3]) == 3) {
|
||||
TrtInfer(argv[1], argv[2]);
|
||||
KunlunXinInfer(argv[1], argv[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user