Skip to content
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

Fix double accumulation in horizontal resampling. #2871

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Apr 16, 2021

Signed-off-by: Michał Zientkiewicz mzient@gmail.com

Why we need this PR?

Pick one, remove the rest

  • It fixes a bug: wrong output when resampling images with >4 channels on GPU

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    • Remove extra accumulation (+= fma)
  • Affected modules and functionalities:
    • GPU Resampling kernel
  • Key points relevant for the review:
    • N/A
  • Validation and testing:
    • Unit test
  • Documentation (including examples):
    • N/A

JIRA TASK: DALI-1964

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@mzient mzient requested a review from a team April 16, 2021 10:31
@@ -121,7 +121,7 @@ __device__ void ResampleHorz_Channels(
int xsample = x < 0 ? 0 : x >= in_w-1 ? in_w-1 : x;
float flt = coeffs[coeff_idx];
Src px = __ldg(in_row + channels * xsample + c);
tmp += fmaf(px, flt, tmp);
tmp = fmaf(px, flt, tmp);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

^^^ actual bug fix

@JanuszL JanuszL self-assigned this Apr 16, 2021
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2275602]: BUILD STARTED

@jantonguirao jantonguirao self-assigned this Apr 16, 2021
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2275602]: BUILD PASSED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants