Fix clang 14 errors in philox when using b8#3333
Merged
umar456 merged 2 commits intoarrayfire:masterfrom Nov 20, 2022
Merged
Conversation
The random number generator for b8 was producing incorrect results on clang 14 due to loop unrolling. This commit addresses the underlying issue caused by ineffective indexing on the b8 RNG and updates one ireduce test to use the ASSERT_VEC_ARRAYS_EQ function
29d5ce1 to
a29014a
Compare
Previously the b8 RNG was only using the lest significant bits for the RNG this is probably okay but it made the CPU indexing difficult. This commit ensures that the LSB of each of the 4 integers are used instead of only the first integer
a29014a to
87f738d
Compare
syurkevi
approved these changes
Nov 20, 2022
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.
The random number generator for b8 was producing incorrect results
on clang 14 due to loop unrolling. This was caused by some incorrect indexing
in the transform function for b8. This PR addresses this issue and fixes additional
issue when generating b8 numbers in all backends
Description
Changes to Users
Better and more consistent RNG for b8 values across backends.
Checklist