MCPcopy Index your code
hub / github.com/apache/tvm / case5_sharded1

Function case5_sharded1

tests/python/tirx/test_layout.py:604–621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602 case4()
603
604 def case5_sharded1():
605 # Tile over a sharded layout - 1
606 layout = TileLayout(S[(8, 1, 4, 2) : (4 @ laneid, 2, 1 @ laneid, 1)])
607 outer = TileLayout(S[(8, 8) : (8, 1)])
608 layout_tile = layout.tile(outer=outer, outer_shape=(8, 8), inner_shape=(8, 8))
609 layout_expected = TileLayout(S[(8, 8, 1, 8, 4, 2) : (16, 4 @ laneid, 2, 2, 1 @ laneid, 1)])
610 assert_structural_equal(layout_expected.canonicalize(), layout_tile)
611
612 outer_res = layout.is_tile_inner(layout_tile, (64, 64), (8, 8))
613 assert outer_res is not None
614 assert_structural_equal(outer_res.canonicalize(), outer.canonicalize())
615
616 inner_res = outer.is_tile_outer(layout_tile, (64, 64), (8, 8))
617 assert inner_res is not None
618 assert_structural_equal(inner_res.canonicalize(), layout.canonicalize())
619
620 assert outer.is_tile_inner(layout_tile, (64, 64), (8, 8)) is None
621 assert layout.is_tile_outer(layout_tile, (64, 64), (8, 8)) is None
622
623 case5_sharded1()
624

Callers 1

test_tile_layoutFunction · 0.85

Calls 6

TileLayoutClass · 0.90
assert_structural_equalFunction · 0.90
canonicalizeMethod · 0.80
is_tile_innerMethod · 0.80
is_tile_outerMethod · 0.80
tileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…