MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / EpilogueAlignment

Function EpilogueAlignment

python/cutlass_library/generator.py:125–135  ·  view source on GitHub ↗

Helper to compute the maximum alignment of the epilogue

(max_alignment, tile, epilogue_steps = 8)

Source from the content-addressed store, hash-verified

123
124#
125def EpilogueAlignment(max_alignment, tile, epilogue_steps = 8):
126 ''' Helper to compute the maximum alignment of the epilogue '''
127
128 def product(X, identity = 1):
129 result = identity
130 for item in X:
131 result *= item
132 return result
133
134 elements_per_thread = product(tile.threadblock_shape[:-1]) // product(tile.warp_count) // 32 // epilogue_steps
135 return min(max_alignment, elements_per_thread)
136
137def DefaultSwizzlingFunctor():
138 return SwizzlingFunctor.Identity8

Calls 2

productFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected