Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
asmorkalov merged 16 commits intoopencv:4.xfromSaltFish-T:4.x
Jul 27, 2023

Conversation

@SaltFish-T
Copy link
Contributor

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

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
return()
endif()

# * libgraph_base.so 添加
Copy link
Contributor

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.

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}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

CANN version check?

fengyuentau reacted with thumbs up emoji
Copy link
ContributorAuthor

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

Copy link
Contributor

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?

Copy link
ContributorAuthor

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.

endif()

if(EXISTS"${CANN_INSTALL_DIR}/opp/op_proto/built-in/inc")
set(LOW_CANN_VERSION"YES" )
Copy link
Member

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?

Copy link
ContributorAuthor

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

@fengyuentaufengyuentau self-assigned thisJul 14, 2023
Remove whitespace at the end of a line
Copy link
Member

@fengyuentaufengyuentau left a 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.

Copy link
Member

@fengyuentaufengyuentau left a 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.

@asmorkalov
Copy link
Contributor

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

Comment on lines 15 to 16
if(UNIX)
else()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

if (NOT UNIX)

if(UNIX)
else()
set(HAVE_CANNOFF)
message(STATUS"CANN: CANN toolkit supports unix but not${CMAKE_SYSTEM_NAME}. Turning off HAVE_CANN")
Copy link
Contributor

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.

Copy link
ContributorAuthor

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)".

Copy link
Contributor

@asmorkalovasmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@asmorkalovasmorkalov merged commitab6bffc intoopencv:4.xJul 27, 2023
@asmorkalovasmorkalov mentioned this pull requestJul 27, 2023
@fengyuentaufengyuentau added this to the4.9.0 milestoneAug 10, 2023
@fengyuentaufengyuentau added the category:dnn_cannCANN backend related issues in DNN module labelSep 13, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull requestJan 4, 2024
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
thewoz pushed a commit to thewoz/opencv that referenced this pull requestMay 29, 2024
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

@fengyuentaufengyuentaufengyuentau approved these changes

Assignees

@fengyuentaufengyuentau

Labels

category: build/installcategory:dnn_cannCANN backend related issues in DNN modulecategory: dnn

Projects

None yet

Milestone

4.9.0

Development

Successfully merging this pull request may close these issues.

3 participants

@SaltFish-T@asmorkalov@fengyuentau

[8]ページ先頭

©2009-2025 Movatter.jp