MCPcopy Create free account
hub / github.com/KnowingNothing/MatmulTutorial / Layout

Class Layout

cutlass.py/mapping.py:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19@dataclass
20class Layout(Function):
21 shape: HyperCube
22 stride: Optional[HyperPoint] = None
23
24 def __post_init__(self):
25 self.ndim = len(self.shape)
26 if self.stride is None:
27 self.stride = Hyperreduce(lambda a, b: a + [a[-1] * b], reversed(self.shape[:-1]), [1])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected