Fix typos in cute docs
Thanks!
Hi, @ccecka, in this example, I think it should be <3:3, (2,4):(1,8)> instead of <3:4, (2,4):(1,8)> , but I can't modify the image.
https://github.com/NVIDIA/cutlass/blob/main/media/images/cute/divide2.png
You're right about that one too, thanks!
Here's the edited image to include in this MR so we can keep everything together.
Looks like that last line describing divide2.png also has an error.
It should read
Note that the first mode of each mode of the result is the sublayout (3,(2,4)):(177,(13,2)) and is precisely the result we would have received if we had applied composition instead of logical_divide.
Found another mistake in https://github.com/NVIDIA/cutlass/blob/main/media/docs/cute/03_tensor.md#owning-tensors
The example of make_tensor_like should be
Tensor rmem_4x8_pad = make_tensor<float>(Shape <_4, _8>{},
Stride<_2,_32>{});
Tensor rmem_4x8_like = make_tensor_like(rmem_4x8_pad);
and according to the order of the Stride<_2,_32>{}, the printed output should be
rmem_4x8_pad : ptr[32b](0x7ff1c8fff920) o (_4,_8):(_2,_32)
rmem_4x8_like : ptr[32b](0x7f4158fffc60) o (_4,_8):(_1,_4)
Gah, good finds. Can you edit those to:
Tensor rmem_4x8_pad = make_tensor<float>(Shape < _4,_8>{},
Stride<_32,_2>{});
Tensor rmem_4x8_like = make_tensor_like(rmem_4x8_pad);
and
rmem_4x8_pad : ptr[32b](0x7ff1c8fff920) o (_4,_8):(_32,_2)
rmem_4x8_like : ptr[32b](0x7f4158fffc60) o (_4,_8):(_8,_1)
Thanks for your help!
Got it. I am a beginner in cutlass/cute. I will read all cute docs, fix the typos and submit them in this MR.
EDIT: Let's actually keep the references to and uses of composition(Tensor, Layout) the way they are and just add an implementation for completeness purposes.
For explanation purposes, I would rather keep it as the simple composition. There are other examples that use a *_divide.
@ccecka , @thakkarV , more work needed in this pr?
@irasin Are you happy with this PR?
This is a good time to add in the composition(Tensor, Layout) to tensor.hpp?
Sorry for the lack of updates. Since I have some new work recently, I have to temporarily suspend my study of cute. Please review and merge this PR if everything's OK.
@ccecka , About the composition(Tensor, Layout), I don't know what your expected implementation should be. Maybe you can add it in someother PR?
Ok @hwu36, let's merge this now and I'll deal with the missing function in another review.
Thanks for your help!