-
Notifications
You must be signed in to change notification settings - Fork 622
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add equalize CPU variant #4742
Add equalize CPU variant #4742
Conversation
for (int sample_idx = 0; sample_idx < num_samples; sample_idx++) { | ||
tp.AddWork([this, sample_idx, &in_view, &out_view](int) { | ||
RunSample(in_view, out_view, sample_idx); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use num_elements() of each sample as priority for the task, so that the larger samples are executed first (better thread utilization)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
void RunSample(TensorListView<StorageCPU, const uint8_t, ndim> &in_view, | ||
TensorListView<StorageCPU, uint8_t, ndim> &out_view, int sample_idx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Accept TensorView's instead of TLV, and get rid of sample_idx argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
3054898
to
0a71003
Compare
!build |
CI MESSAGE: [7724818]: BUILD STARTED |
CI MESSAGE: [7724818]: BUILD PASSED |
Category:
New feature (non-breaking change which adds functionality)
Description:
The PR adds CPU variant for
fn.experimental.equalize
operator. It simply wraps opencv call to cv::equalizeHist.Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-3264