Fix processing cost calculator: the order of filter support #5009
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.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
In the setup, the resize operator estimates the cost of running the resize with different orders of the resampled axes. It uses output, input sizes and the size of filters used along particular axes. However, it seems that the filters support size is unnecesarily reversed when passed to the best order calculator, which may result in sub-optimal performance in some cases.
Additional information:
Affected modules and functionalities:
The performance of the dali resize operator, esp. for downsampling with antialias on and filters with big radious.
Key points relevant for the review:
While the shapes and arguments come in a (D)HW (limited to spatial dims) layout, the SampleDesc keeps the extents in the WH(D) order. The filters are setup in the
SetFilters
method called a few lines above the fix. They are kept in the SampleDesc in the WH(D) order, same as the computed input (roi) and output shapes here.Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A