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

G-API: Advanced device selection for ONNX DirectML Execution Provider#24060

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

Conversation

@TolyaTalamanov
Copy link
Contributor

@TolyaTalamanovTolyaTalamanov commentedJul 26, 2023
edited
Loading

Overview

Extendcv::gapi::onnx::ep::DirectML to acceptadapter name asctor parameter in order to select execution device byname.
E.g:

pp.cfgAddExecutionProvider(cv::gapi::onnx::ep::DirectML("Intel Graphics"));

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@TolyaTalamanovTolyaTalamanovforce-pushed theat/advanced-device-selection-onnxrt-directml branch from954113d to0e60eccCompareJuly 26, 2023 13:38
#ifdef HAVE_DXCORE

// FIXME: Fix warning
#defineWINVER0x0A00
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

ButDXCore minimum required version isWindows 10:

Taken from system header:<dxcore.h>
image

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. I propose to setWINVER globally in CMake.
  2. Cmake should print this during configuration.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

asmorkalov reacted with thumbs up emoji
if(HAVE_ONNX_DML)
ocv_target_compile_definitions(${the_module}PRIVATE HAVE_ONNX_DML=1)
# FIXME: It shouldn't be here...
ocv_target_compile_definitions(${the_module}PRIVATE HAVE_DXCORE=1)
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@opencv-alalek Could you advice howdxcore,d3d12 anddirectml can be detected by opencv?
Should we use the similar approach as there:
https://github.com/opencv/opencv/blob/4.x/cmake/OpenCVDetectDirectX.cmake ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we need to have something likeOpenCVDetectDirectML.cmake

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

@dmatveevdmatveev self-assigned thisJul 26, 2023
Copy link
Contributor

@dmatveevdmatveev left a comment

Choose a reason for hiding this comment

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

+1 to all open self-questions regarding managing the DX components and Windows version properly...

Copy link
Contributor

@smirnov-alexeysmirnov-alexey left a comment

Choose a reason for hiding this comment

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

Overall looks OK but you need to resolve DXCORE and Windows version dependencies

@smirnov-alexey
Copy link
Contributor

@TolyaTalamanov also, can we add some tests or a sample on that feature?

@asmorkalov
Copy link
Contributor

@TolyaTalamanov@dmatveev Friendly reminder.

1 similar comment
@asmorkalov
Copy link
Contributor

@TolyaTalamanov@dmatveev Friendly reminder.

@TolyaTalamanov
Copy link
ContributorAuthor

@opencv-alalek@asmorkalov Hi folks! Could you have a look at this one more time, please?

@TolyaTalamanov
Copy link
ContributorAuthor

Hi@asmorkalov can we proceed with merge here?

asmorkalov and TolyaTalamanov reacted with eyes emoji

@TolyaTalamanovTolyaTalamanov added this to the4.9.0 milestoneNov 14, 2023
@TolyaTalamanov
Copy link
ContributorAuthor

@asmorkalov Hi! Let me know if there is anything else left

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 commit0e151e3 intoopencv:4.xNov 16, 2023
@dmatveev
Copy link
Contributor

Cool - thanks@asmorkalov !

IskXCr pushed a commit to Haosonn/opencv that referenced this pull requestDec 20, 2023
…e-selection-onnxrt-directmlG-API: Advanced device selection for ONNX DirectML Execution Provideropencv#24060### OverviewExtend `cv::gapi::onnx::ep::DirectML` to accept `adapter name` as `ctor` parameter in order to select execution device by `name`.E.g:```pp.cfgAddExecutionProvider(cv::gapi::onnx::ep::DirectML("Intel Graphics"));```### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [ ] I agree to contribute to the project under Apache 2 License.- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [ ] The PR is proposed to the proper branch- [ ] There is a reference to the original bug report and related work- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable      Patch to opencv_extra has the same branch name.- [ ] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this pull requestJan 4, 2024
…e-selection-onnxrt-directmlG-API: Advanced device selection for ONNX DirectML Execution Provideropencv#24060### OverviewExtend `cv::gapi::onnx::ep::DirectML` to accept `adapter name` as `ctor` parameter in order to select execution device by `name`.E.g:```pp.cfgAddExecutionProvider(cv::gapi::onnx::ep::DirectML("Intel Graphics"));```### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [ ] I agree to contribute to the project under Apache 2 License.- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [ ] The PR is proposed to the proper branch- [ ] There is a reference to the original bug report and related work- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable      Patch to opencv_extra has the same branch name.- [ ] The feature is well documented and sample code can be built with the project CMake
@asmorkalovasmorkalov mentioned this pull requestJan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull requestMay 29, 2024
…e-selection-onnxrt-directmlG-API: Advanced device selection for ONNX DirectML Execution Provideropencv#24060### OverviewExtend `cv::gapi::onnx::ep::DirectML` to accept `adapter name` as `ctor` parameter in order to select execution device by `name`.E.g:```pp.cfgAddExecutionProvider(cv::gapi::onnx::ep::DirectML("Intel Graphics"));```### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [ ] I agree to contribute to the project under Apache 2 License.- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [ ] The PR is proposed to the proper branch- [ ] There is a reference to the original bug report and related work- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable      Patch to opencv_extra has the same branch name.- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dmatveevdmatveevdmatveev left review comments

@opencv-alalekopencv-alalekopencv-alalek left review comments

@asmorkalovasmorkalovasmorkalov approved these changes

@smirnov-alexeysmirnov-alexeysmirnov-alexey approved these changes

Assignees

@dmatveevdmatveev

Projects

None yet

Milestone

4.9.0

Development

Successfully merging this pull request may close these issues.

5 participants

@TolyaTalamanov@smirnov-alexey@asmorkalov@dmatveev@opencv-alalek

[8]ページ先頭

©2009-2025 Movatter.jp