update opencv dnn to support cann version >=6.3#23936
update opencv dnn to support cann version >=6.3#23936asmorkalov merged 16 commits intoopencv:4.xfrom
Conversation
Medify search path of libopsproto.so add 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.
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.
${CMAKE_HOST_SYSTEM_PROCESSOR} = x86_64 or aarch64. This depends on which CPU architecture is used
There was a problem hiding this comment.
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.
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.
Can we use CANN_VERSION_BELOW_6_3_ALPHA002 to make it meaningful?
There was a problem hiding this comment.
OK,this makes it easier to understand
Remove whitespace at the end of a line
fengyuentau
left a comment
There was a problem hiding this comment.
👍 Tried with this patch with old CANN and the build was successful.
fengyuentau
left a comment
There was a problem hiding this comment.
👍 Tried with this patch with old CANN and the build was successful.
|
@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() |
cmake/OpenCVFindCANN.cmake
Outdated
| if(UNIX) | ||
| else() | ||
| set(HAVE_CANN OFF) | ||
| message(STATUS "CANN: CANN toolkit supports unix but not ${CMAKE_SYSTEM_NAME}. Turning off HAVE_CANN") |
There was a problem hiding this comment.
I propose to use message(WARNING). It's highlighted red and caught by CI.
There was a problem hiding this comment.
I use message(WARNING) in every place that "set(HAVE_CANN OFF)".
Update opencv dnn to support cann version >=6.3 opencv#23936 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
Update opencv dnn to support cann version >=6.3 opencv#23936 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
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