Merged
Conversation
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Member
Author
|
!build |
Collaborator
|
CI MESSAGE: [14782104]: BUILD STARTED |
mzient
reviewed
May 6, 2024
Comment on lines
+168
to
+169
| in_view[sample_idx].data[channel_idx * range_size + i] = | ||
| (i == 71 + channel_idx) ? ((sample_idx << 11) + channel_idx) : 0; |
Contributor
There was a problem hiding this comment.
This code looks almost as if intentionally obfuscated.
Suggested change
| in_view[sample_idx].data[channel_idx * range_size + i] = | |
| (i == 71 + channel_idx) ? ((sample_idx << 11) + channel_idx) : 0; | |
| int index_of_nonzero_value = 71 + channel_idx; | |
| int nonzero_value = (sample_idx << 11) + channel_idx; | |
| in_view[sample_idx].data[channel_idx * range_size + i] = | |
| i == index_of_nonzero_value ? nonzero_value : 0; |
Member
Author
|
!build |
mzient
reviewed
May 6, 2024
| 123 * channel_idx + sample_idx; | ||
| ASSERT_EQ(batch_shape[sample_idx][1], range_size); | ||
| for (int i = 0; i < range_size; i++) { | ||
| int index_of_nonzero_value = 71 + channel_idx; |
Contributor
There was a problem hiding this comment.
Suggested change
| int index_of_nonzero_value = 71 + channel_idx; | |
| int index_of_nonzero_value = sample_idx * 71 + channel_idx; |
Collaborator
|
CI MESSAGE: [14782491]: BUILD STARTED |
mzient
reviewed
May 6, 2024
| in_view[sample_idx].data[channel_idx * range_size + sample_idx * 71 + channel_idx] = | ||
| 123 * channel_idx + sample_idx; | ||
| ASSERT_EQ(batch_shape[sample_idx][1], range_size); | ||
| int nonzero_idx = 71 + channel_idx; |
Contributor
There was a problem hiding this comment.
Do we want to keep it constant across samples?
Member
Author
There was a problem hiding this comment.
After all, why not. I added it back.
mzient
approved these changes
May 6, 2024
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
Member
Author
|
!build |
Collaborator
|
CI MESSAGE: [14783150]: BUILD STARTED |
Collaborator
|
CI MESSAGE: [14783150]: BUILD PASSED |
klecki
approved these changes
May 7, 2024
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.
Category:
Other (e.g. Documentation, Tests, Configuration)
Description:
Fixes a bug in equalize unit tests. One of the cases assumed the allocated memory is zero-ed out, while it is not.
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: N/A