[G-API] Pipeline modeling tool: Support num_iters criteria#22596
Merged
asmorkalov merged 5 commits intoopencv:4.xfrom Oct 7, 2022
Merged
[G-API] Pipeline modeling tool: Support num_iters criteria#22596asmorkalov merged 5 commits intoopencv:4.xfrom
asmorkalov merged 5 commits intoopencv:4.xfrom
Conversation
TolyaTalamanov
commented
Oct 4, 2022
| check_and_read<double>(fs, "work_time", "Config"); | ||
| if (work_time_ms < 0) { | ||
| throw std::logic_error("work_time must be positive"); | ||
| auto opt_work_time_ms = readOpt<double>(fs["work_time"]); |
Contributor
Author
There was a problem hiding this comment.
These changes will affect python tests.
TolyaTalamanov
commented
Oct 4, 2022
| return ss.str(); | ||
| } | ||
|
|
||
| class StopCriteria { |
Contributor
Author
There was a problem hiding this comment.
Probably over design.
On the other hand what if another stop criteria will be needed (e.g N iters, but no more than Xms).
Contributor
There was a problem hiding this comment.
I believe it is Criterion, not Criteria (plural form)
TolyaTalamanov
commented
Oct 4, 2022
| Pipelines: | ||
| PL1:\" """ | ||
| PL1: | ||
| queue_capacity: 1\" """ |
Contributor
Author
There was a problem hiding this comment.
Otherwise PL1 not treated as Map and test gets failed
Contributor
Author
|
@smirnov-alexey @dmatveev Could you have a look, please? |
Contributor
Author
|
@asmorkalov Can it be merged? |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Motiviation
Let's image use case where execution should last: 50ms
and one pipeline iterations takes 15ms.
In that case the picture will be:
But if user enabled
--drop_framesthe picture would be different:So
--drop_framescould significantly affectFPS, because number of iterations depends on this flag.But what if user want to run certain number of iteration but at the same time schedule pipelines with
--drop_framesmode?Implementation
Now every
Pipelinecould have localnum_itersproperty. The logic is following:num_itersis local property forPipeline. (no globalnum_iters)num_itersis set then it takes priority overwork_time.work_timeis still global (no localwork_timeperPipeline), but now is not necessary to be specified.Pipelinedoesn't havenum_itersproperty and globalwork_timeisn't specified then throw error.