Skip to content

G-API: Add VPP preproc CPU/GPU dispatcher#21687

Merged
alalek merged 3 commits intoopencv:4.xfrom
sivanov-work:vpp_pp_integr
Mar 15, 2022
Merged

G-API: Add VPP preproc CPU/GPU dispatcher#21687
alalek merged 3 commits intoopencv:4.xfrom
sivanov-work:vpp_pp_integr

Conversation

@sivanov-work
Copy link
Copy Markdown
Contributor

@sivanov-work sivanov-work commented Mar 5, 2022

Added VPP preproc Dispatcher/Facade implements the same IPreprocEngine interface and aggregates CPU & GPU preproc engine and switch implementation by actual MediaFrame type.

Pull Request Readiness Checklist

See details at https://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

Build Configuration

force_builders=XCustom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
build_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

Xbuild_image:Custom=centos:7
Xbuildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

build_image:Custom=ubuntu-openvino-2021.3.0:20.04
Xbuild_image:Custom Win=openvino-2021.2.0
build_image:Custom Mac=openvino-2021.2.0

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

build_image:Custom Win=gapi-onevpl-2021.6.0
buildworker:Custom Win=windows-3
build_contrib:Custom Win=OFF

@sivanov-work sivanov-work marked this pull request as ready for review March 5, 2022 13:27
//
// Copyright (C) 2022 Intel Corporation

#ifndef GAPI_STREAMING_ONVPL_PREPROC_DISPATCHER_HPP
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ONVPL -> ONEVPL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

return workers.size();
}
private:
std::set<std::shared_ptr<cv::gapi::wip::IPreprocEngine>> workers;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't get the idea of using set here. Why don't u use vector instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Contributor

@rgarnov rgarnov left a comment

Choose a reason for hiding this comment

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

Just wondering: are there the cases where we need a single entity which can process data from different origins? I mean, maybe we should make some restrictions on worker count, or proposed dispatcher is planned to be shared?

@sivanov-work
Copy link
Copy Markdown
Contributor Author

@rgarnov
Currently there are no use-cases besides GIEbackend next more detailed-covered integration scenario.
But It can process possible situation with two or more inputs;
and process future heterogenous case when source produces GPU data (when AC is powered) and CPU data (when not).

@TolyaTalamanov TolyaTalamanov self-requested a review March 14, 2022 14:32
@dmatveev dmatveev self-assigned this Mar 15, 2022
Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

👍 but got no idea how it works though

@sivanov-work
Copy link
Copy Markdown
Contributor Author

@alalek Could you merge it please?

@alalek alalek merged commit 54733eb into opencv:4.x Mar 15, 2022
@opencv-pushbot opencv-pushbot mentioned this pull request Apr 23, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
G-API: Add VPP preproc CPU/GPU dispatcher

* Add VPP preproc acceleration dispatcher & UTs

* Fix compilation

* Apply some comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants