[SYCL] Set marray alignment enabling vectorized loads#9395
Closed
JackAKirk wants to merge 3 commits intointel:syclfrom
Closed
[SYCL] Set marray alignment enabling vectorized loads#9395JackAKirk wants to merge 3 commits intointel:syclfrom
JackAKirk wants to merge 3 commits intointel:syclfrom
Conversation
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Comment on lines
+57
to
+63
| res--; | ||
| res |= res >> 1; | ||
| res |= res >> 2; | ||
| res |= res >> 4; | ||
| res |= res >> 8; | ||
| res |= res >> 16; | ||
| res++; |
Contributor
There was a problem hiding this comment.
We should not round up to the next power of 2 (neither for marray<T,3> nor if sizeof T isn't a power of 2) but round down instead.
Contributor
There was a problem hiding this comment.
Are you suggesting rounding down to the previous power of two purely for the sake of saving memory, or is there a bug in rounding up?
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.
As described here #6038 (comment) we need to properly set the alignment of marray so that we can load from/store to vectors using vectorized loads/stores. This is an ABI break.
Fix courtesy of @jchlanda