Skip to content

[SYCL] Set marray alignment enabling vectorized loads #9395

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

Closed
wants to merge 3 commits into from

Conversation

JackAKirk
Copy link
Contributor

@JackAKirk JackAKirk commented May 10, 2023

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

@JackAKirk JackAKirk added the abi-break change that's breaking abi and waiting for the next window to be able to merge label May 10, 2023
@JackAKirk JackAKirk marked this pull request as ready for review May 10, 2023 16:20
@JackAKirk JackAKirk requested a review from a team as a code owner May 10, 2023 16:20
@JackAKirk JackAKirk closed this May 10, 2023
@JackAKirk JackAKirk reopened this May 10, 2023
@JackAKirk JackAKirk closed this May 15, 2023
@JackAKirk JackAKirk reopened this May 15, 2023
@JackAKirk JackAKirk temporarily deployed to aws May 15, 2023 08:31 — with GitHub Actions Inactive
@JackAKirk JackAKirk temporarily deployed to aws May 15, 2023 11:56 — with GitHub Actions Inactive
@JackAKirk JackAKirk temporarily deployed to aws May 17, 2023 10:26 — with GitHub Actions Inactive
@JackAKirk JackAKirk temporarily deployed to aws May 17, 2023 11:17 — with GitHub Actions Inactive
Comment on lines +57 to +63
res--;
res |= res >> 1;
res |= res >> 2;
res |= res >> 4;
res |= res >> 8;
res |= res >> 16;
res++;
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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?

@JackAKirk JackAKirk closed this Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi-break change that's breaking abi and waiting for the next window to be able to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants