cutlass icon indicating copy to clipboard operation
cutlass copied to clipboard

Fix typos in cute docs

Open irasin opened this issue 1 year ago • 13 comments

irasin avatar Apr 16 '24 02:04 irasin

Thanks!

ccecka avatar Apr 16 '24 02:04 ccecka

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

irasin avatar Apr 16 '24 03:04 irasin

You're right about that one too, thanks!

Here's the edited image to include in this MR so we can keep everything together.

divide2

ccecka avatar Apr 16 '24 04:04 ccecka

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.

ccecka avatar Apr 16 '24 04:04 ccecka

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)

irasin avatar Apr 17 '24 06:04 irasin

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!

ccecka avatar Apr 17 '24 07:04 ccecka

Got it. I am a beginner in cutlass/cute. I will read all cute docs, fix the typos and submit them in this MR.

irasin avatar Apr 17 '24 07:04 irasin

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.

ccecka avatar Apr 18 '24 14:04 ccecka

For explanation purposes, I would rather keep it as the simple composition. There are other examples that use a *_divide.

ccecka avatar Apr 18 '24 14:04 ccecka

@ccecka , @thakkarV , more work needed in this pr?

hwu36 avatar Apr 24 '24 17:04 hwu36

@irasin Are you happy with this PR?

This is a good time to add in the composition(Tensor, Layout) to tensor.hpp?

ccecka avatar Apr 24 '24 17:04 ccecka

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?

irasin avatar Apr 25 '24 05:04 irasin

Ok @hwu36, let's merge this now and I'll deal with the missing function in another review.

Thanks for your help!

ccecka avatar Apr 25 '24 05:04 ccecka