Skip to content
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

[QST] The definition of zero stride in CUTE layout algebra #1772

Open
aws-jiadingg opened this issue Sep 3, 2024 · 2 comments
Open

[QST] The definition of zero stride in CUTE layout algebra #1772

aws-jiadingg opened this issue Sep 3, 2024 · 2 comments

Comments

@aws-jiadingg
Copy link

aws-jiadingg commented Sep 3, 2024

What is your question?

auto sA_layout = make_layout(make_shape(bM, bK));                 // (m,k) -> smem_idx; m-major  
ThrCopy thr_copy_a = copy_a.get_slice(threadIdx.x); 
Tensor sA = make_tensor(make_smem_ptr(smemA), sA_layout);            // (BLK_M,BLK_K) 
Tensor tAsA = thr_copy_a.partition_D(sA);    

From the above snippet from sgemm_2.cu, I got the following from partitioning sA via ThrCopy:

sA:
smem_ptr[32b](0x6ffff4000000) o (_128,_8):(_1,_128)

tAsA:
smem_ptr[32b](0x6ffff4000ff0) o ((_4,_1),_1,_1):((_1,_0),_0,_0)

How to interpret those _0 in tAsA? In the tutorial, there was a mentioning that _0 in the dimensions of tAsA indicates a dimension with size 1 where the exact stride is not crucial, allowing it to be any value. But if we follow the coordinate-to-index mapping equation (index = shapes .* strides), _0 could also be interpreted as that the tensor is being broadcasted along that dimension?

Will the meaning of _0 change depending on the print scenario or it always means ignore the stride in this dimension?

Copy link

github-actions bot commented Oct 3, 2024

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

Copy link

github-actions bot commented Jan 2, 2025

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant