Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
update opencv dnn to support cann version >=6.3#23936
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Medify search path of libopsproto.soadd libgraph_base.so to libs_cann
modify the include path of "all_ops.h"
Automatically identify the socVersion and verify it
add notice
cmake/OpenCVFindCANN.cmake Outdated
| return() | ||
| endif() | ||
| # * libgraph_base.so 添加 |
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.
Please use English for comments.
cmake/OpenCVFindCANN.cmake Outdated
| endif() | ||
| # * libopsproto.so | ||
| set(lib_opsproto"${CANN_INSTALL_DIR}/opp/op_proto/built-in") | ||
| set(lib_opsproto"${CANN_INSTALL_DIR}/opp/built-in/op_proto/lib/linux/${CMAKE_HOST_SYSTEM_PROCESSOR}") |
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.
CANN version check?
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_HOST_SYSTEM_PROCESSOR} = x86_64 or aarch64. This depends on which CPU architecture is used
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.
I mean, that different versions of CANN SDK has different layout. M.b. we need to presume compatibility and have both branches with version check?
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.
It's a good way. In my tests, this change is uitable for cann version 6.3 and above.
Upgrade to make compilation compatible with lower versions at the same time
cmake/OpenCVFindCANN.cmake Outdated
| endif() | ||
| if(EXISTS"${CANN_INSTALL_DIR}/opp/op_proto/built-in/inc") | ||
| set(LOW_CANN_VERSION"YES" ) |
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.
Can we useCANN_VERSION_BELOW_6_3_ALPHA002 to make it meaningful?
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.
OK,this makes it easier to understand
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Remove whitespace at the end of a line
fengyuentau left a comment
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.
👍 Tried with this patch with old CANN and the build was successful.
fengyuentau left a comment
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.
👍 Tried with this patch with old CANN and the build was successful.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
asmorkalov commentedJul 17, 2023
@SaltFish-T Thanks a lot for the patch. Could you recommend ready Dockerfile for installation instructions in English for CANN SDK. It looks like it's useful have it in CI as build target at least. |
cmake/OpenCVFindCANN.cmake Outdated
| if(UNIX) | ||
| else() |
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.
if (NOT UNIX)
cmake/OpenCVFindCANN.cmake Outdated
| if(UNIX) | ||
| else() | ||
| set(HAVE_CANNOFF) | ||
| message(STATUS"CANN: CANN toolkit supports unix but not${CMAKE_SYSTEM_NAME}. Turning off HAVE_CANN") |
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.
I propose to use message(WARNING). It's highlighted red and caught by CI.
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.
I use message(WARNING) in every place that "set(HAVE_CANN OFF)".
asmorkalov left a comment
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.
👍
Update opencv dnn to support cann version >=6.3opencv#239361.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well
Update opencv dnn to support cann version >=6.3opencv#239361.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well
1.modify the search path of "libopsproto.so" in OpenCVFindCANN.cmake
2.add the search path of "libgraph_base.so" in OpenCVFindCANN.cmake
3.automatic check Ascend socVersion,and test on Ascend310/Ascend310B/Ascend910B well