-
Notifications
You must be signed in to change notification settings - Fork 669
[Backend] add sophgo backend #1015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2674c4d to
062d284
Compare
cmake/sophgo.cmake
Outdated
| # include_directories(${SOPHGONPU_RUNTIME_PATH}/${SOPHGO_TARGET}/include) | ||
| #else () | ||
| # message(FATAL_ERROR "[SOPHGO.cmake] download_and_decompress SOPHGO_runtime error") | ||
| #endif () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释的debug代码需要删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经去掉注释
| # SOPHGO部署库编译 | ||
|
|
||
| ## C++ SDK编译安装 | ||
| SOPHGO支持linux下进行编译,系统为Debian/Ubuntu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python不能支持么?
| @@ -0,0 +1,61 @@ | |||
| # paddleclas C++部署示例 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PaddleClas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改
| @@ -0,0 +1,35 @@ | |||
| Global: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个yaml文件跟模型里面自带的inference_cls.yaml是重复的么,是否可以移除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经移除
| @@ -0,0 +1,47 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件在README.md中没提到怎么使用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件没有用,已经移除了
| @@ -0,0 +1,47 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
docs/cn/build_and_install/sophgo.md
Outdated
| @@ -0,0 +1,43 @@ | |||
| # SOPHGO部署库编译 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档需同时在docs/en/build_and_install提供英文版本
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经添加英文版本。
| #include <vector> | ||
|
|
||
| namespace fastdeploy { | ||
| struct SophgoBackendOption{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有任何配置参数吗?
fastdeploy/runtime.cc
Outdated
| << model_file << std::endl; | ||
| return false; | ||
| } | ||
| }else if (model_format == ModelFormat::SOPHGO) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
花括号后需要空格
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已加
| valid_ipu_backends = {Backend::PDINFER}; | ||
| } else { | ||
| }else if (model_format == ModelFormat::SOPHGO) { | ||
| valid_cpu_backends = {Backend::SOPHGONPU2}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SOPHOGONPU2还支持CPU吗? 另外这个后面加的2是表示2代吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里写的有问题,已经做了修改。
c907187 to
99fcb86
Compare
| # 添加FastDeploy库依赖 | ||
| message(STATUS @@) | ||
| message(STATUS ${FASTDEPLOY_LIBS}) | ||
| target_link_libraries(infer_demo ${FASTDEPLOY_LIBS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17-18行不需要
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改
| install(PROGRAMS ${PADDLELITE_LIBS} DESTINATION lib) | ||
|
|
||
| file(GLOB TIMVX_LIBS ${FASTDEPLOY_INSTALL_DIR}/third_libs/install/paddlelite/lib/verisilicon_timvx/*) | ||
| install(PROGRAMS ${TIMVX_LIBS} DESTINATION lib) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
20~39行与sophgo也无关系,可以移除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经删除
| @@ -0,0 +1,75 @@ | |||
| # PaddleDetection SOPHGO部署示例 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个标题需要修改,当前目录为YOLOv5
| install(PROGRAMS ${PADDLELITE_LIBS} DESTINATION lib) | ||
|
|
||
| file(GLOB TIMVX_LIBS ${FASTDEPLOY_INSTALL_DIR}/third_libs/install/paddlelite/lib/verisilicon_timvx/*) | ||
| install(PROGRAMS ${TIMVX_LIBS} DESTINATION lib) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同Clas中的CMAKE,移除不必要的代码
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改
| @@ -0,0 +1,56 @@ | |||
| # PaddleDetection C++部署示例 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
| install(PROGRAMS ${PADDLELITE_LIBS} DESTINATION lib) | ||
|
|
||
| file(GLOB TIMVX_LIBS ${FASTDEPLOY_INSTALL_DIR}/third_libs/install/paddlelite/lib/verisilicon_timvx/*) | ||
| install(PROGRAMS ${TIMVX_LIBS} DESTINATION lib) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同前面的CMAKE问题
| @@ -0,0 +1,277 @@ | |||
| #include "fastdeploy/backends/sophgo/sophgo_backend.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参照其它代码添加copyright在代码开头
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经添加
add sophgo backend in fastdeploy add resnet50, yolov5s, liteseg examples.
PR types(PR类型)
Description