[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
@@ -47,12 +47,12 @@ void CpuInfer(const std::string& model_dir, const std::string& image_file) {
std::cout << "Visualized result saved in ./vis_result.jpg" << std::endl;
}
void XpuInfer(const std::string& model_dir, const std::string& image_file) {
void KunlunXinInfer(const std::string& model_dir, const std::string& image_file) {
auto model_file = model_dir + sep + "model.pdmodel";
auto params_file = model_dir + sep + "model.pdiparams";
auto config_file = model_dir + sep + "infer_cfg.yml";
auto option = fastdeploy::RuntimeOption();
option.UseXpu(0, 0, false, false);
option.UseKunlunXin(0, 0, false, false);
auto model = fastdeploy::vision::detection::FasterRCNN(
model_file, params_file, config_file, option);
if (!model.Initialized()) {
@@ -109,7 +109,7 @@ int main(int argc, char* argv[]) {
"e.g ./infer_model ./faster_rcnn_r50_vd_fpn_2x_coco ./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 xpu."
"with gpu; 2: run with kunlunxin."
<< std::endl;
return -1;
}
@@ -119,7 +119,7 @@ int main(int argc, char* argv[]) {
} else if (std::atoi(argv[3]) == 1) {
GpuInfer(argv[1], argv[2]);
} else if (std::atoi(argv[3]) == 2) {
XpuInfer(argv[1], argv[2]);
KunlunXinInfer(argv[1], argv[2]);
}
return 0;
}