Skip to content

Use 128-bit data loading #326

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

Merged
merged 1 commit into from
Jun 2, 2025
Merged

Use 128-bit data loading #326

merged 1 commit into from
Jun 2, 2025

Conversation

kitecats
Copy link
Contributor

For 128-bit vectorized load operations, we should use AutoVectorizingCopyWithAssumedAlignment<sizeof(uint128_t)*8> instead of AutoVectorizingCopyWithAssumedAlignment<sizeof(uint128_t)>. This is because the AutoVectorizingCopyWithAssumedAlignment template parameter expects the alignment value in bits, whereas sizeof(uint128_t) returns 16 bytes. Passing the byte value directly would mistakenly make the template use 16-bit alignment, resulting in actual operations using uint16_t for data loading rather than the intended 128-bit vectorized loading.

@DefTruth DefTruth self-requested a review June 2, 2025 09:21
@DefTruth
Copy link
Member

DefTruth commented Jun 2, 2025

@botbw Can you take a look to this PR?

@botbw
Copy link
Member

botbw commented Jun 2, 2025

AutoVectorizingCopyWithAssumedAlignment

@kitecats @DefTruth Yuh it should be a typo here, sizeof(uint128_t) returns bytes, thanks for pointing out.

https://github.com/NVIDIA/cutlass/blob/9d165a3b8ef446a7ff3db198413f82bcb83f46fe/include/cute/arch/copy.hpp#L68-L81

Copy link
Member

@botbw botbw left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

Copy link
Member

@DefTruth DefTruth left a comment

Choose a reason for hiding this comment

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

LGTM~

@DefTruth DefTruth merged commit c10770b into xlite-dev:main Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants