Created
September 23, 2025 19:01
-
-
Save shauray8/c0c07c973171971c93f9996997fb384e to your computer and use it in GitHub Desktop.
teny tiny gist kernel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cutlass | |
| import cutlass.cute as cute | |
| @cute.jit | |
| def compose_layouts(): | |
| # Define two layouts | |
| layout_a = cute.make_layout((6, 2), stride=(1, 7)) | |
| layout_b = cute.make_layout((3, 2), stride=(2, 3)) | |
| composed = cute.composition(layout_a, layout_b) | |
| print("Layout A shape:", layout_a.shape) | |
| print("Layout B shape:", layout_b.shape) | |
| print("Composed layout shape:", composed.shape) | |
| print("Composed layout strides:", composed.stride) | |
| if __name__ == "__main__": | |
| compose_layouts() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment