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

Function print_matrix

cutlass.py/swizzle.py:47–54  ·  view source on GitHub ↗
(mtx, rows, cols, func=lambda x: x, prompt="")

Source from the content-addressed store, hash-verified

45 return (xy % rows, xy // rows)
46
47 def print_matrix(mtx, rows, cols, func=lambda x: x, prompt=""):
48 print(prompt)
49 for x in range(rows):
50 for y in range(cols):
51 item = mtx[x][y]
52 item = func(item)
53 print(item, end=" ")
54 print()
55
56 # Swizzle<3, 4, 4>
57 print("Swizzle<3,4,3>")

Callers 1

test_swizzleFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_swizzleFunction · 0.56