[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:
yeliang2258
2022-12-27 10:02:02 +08:00
committed by GitHub
parent 6078bd9657
commit 45865c8724
111 changed files with 369 additions and 368 deletions

View File

@@ -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
```

View File

@@ -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;
}