-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG] Copy_Atom with DefaultCopy cause misaligned address #1272
Comments
The alignment assumptions are for dynamic layouts only. The static layouts that you're passing to copy are being proven to be aligned and are being vectorized. The misalignment is coming from the pointer itself. You can use
or pass in a tile of data from gmem with the dynamic stride in it to reflect the potential misalignment. CuTe cannot detect misaligned pointers and dynamically branch between vectorized and non-vectorized copy paths. |
with if(thread(255)) {
print(stripe_gA(_, _, _0{}, 0));
print(thr_copy.partition_S(stripe_gA(_, _, _0{}, 0)));
print_tensor(staging_a);
} gmem_ptr[32b](0xb04c00000) o (_128,_8):(_1,1024) // <-- size = 1024
gmem_ptr[32b](0xb04c071f0) o ((_1,_4),_1,_1):((_0,_1),_0,_0)
ptr[32b](0x7fa274fffce0) o _4:_1:
0.00e+00
0.00e+00
0.00e+00
0.00e+00 So it is This should be documented very carefully, tho. |
Correct. I agree that ideally |
This issue has been labeled |
Closing due to inactivity |
Describe the bug
As of b7508e3,
Copy_Atom<DefaultCopy, float>
cause misaligned address.Steps/Code to reproduce bug
produces
Expected behavior
As
DefaultCopy
assume the data is aligned to the byte boundary, the code must not produce error.Base on the line
int size = 129; // misaligned address iff size % 4 != 0
, if I change it to 128 or 132, etc, then there will be no problem.Environment details (please complete the following information):
The text was updated successfully, but these errors were encountered: