-
Notifications
You must be signed in to change notification settings - Fork 35
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
RPP Glitch on HOST and HIP #357
base: develop
Are you sure you want to change the base?
Conversation
r-abishek
commented
May 17, 2024
- Adds support for glitch augmentation on host and hip
- Adds relevant unit/performance/QA tests
…itch augmentation
…ripts for glitch augmentation
…litch augmentation
added golden output support for glitch
… for performance tests
* add NFT and NTF layouts * Set layout for spectrogram and melfilterbank directly in testsuite * Remove extra blank line in testsuite * minor changes in test suite * minor change in MFB description --------- Co-authored-by: Snehaa Giridharan <snehaa@multicorewareinc.com> Co-authored-by: sampath1117 <sampath.rachumallu@multicorewareinc.com>
cleanup the code
RPP Glitch Tensor on HOST and HIP
inline void compute_src_loc(int row , int col, Rpp32s *locArray, RpptDescPtr srcDescPtr, RpptChannelOffsets *rgbOffsets, RpptROI roi, int batchCount, int channelValue) | ||
{ | ||
int xR, yR, xG, yG, xB, yB; | ||
xR = col + rgbOffsets[batchCount].r.x; |
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.
can we make sure the rgbOffsets[]... are within valid boundary thereby avoiding the boundary checks below
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.
Discussed this, and the only solution here without checking bounds might be to just trust the user/caller that they will give the values within bounds, which may not necessarily be true.
Agreed to have the checks on the hip side at least for now.
src/modules/cpu/kernel/glitch.hpp
Outdated
Rpp32f *dstPtrRow; | ||
dstPtrRow = dstPtrChannel; | ||
Rpp32u vectorIncrement = 8; | ||
Rpp32u alignedLength = (static_cast<int>(roi.xywhROI.roiWidth * 0.75)) & ~7; // Considering 75% of the ROI width to avoid loading out-of-bounds locations. |
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.
as we discussed, this can cause some areas visibily showing without glitching. why don't we make it truncated to the nearest multiple of 16 for alignment as well
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, removed the 0.75, changed to nearest multiple of alignedLength
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.
Added some comments
RPP Glitch - Modified Aligned Length computation