Skip to content

Instantly share code, notes, and snippets.

@shauray8
Created September 23, 2025 19:01
Show Gist options
  • Select an option

  • Save shauray8/c0c07c973171971c93f9996997fb384e to your computer and use it in GitHub Desktop.

Select an option

Save shauray8/c0c07c973171971c93f9996997fb384e to your computer and use it in GitHub Desktop.
teny tiny gist kernel
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