MCPcopy Create free account
hub / github.com/apache/tvm / _swizzle_atom_bytes

Function _swizzle_atom_bytes

python/tvm/backend/cuda/lang/alloc_pool.py:77–86  ·  view source on GitHub ↗

Return the row width (in bytes) of one swizzle atom for *swizzle_mode*.

(swizzle_mode)

Source from the content-addressed store, hash-verified

75
76
77def _swizzle_atom_bytes(swizzle_mode):
78 """Return the row width (in bytes) of one swizzle atom for *swizzle_mode*."""
79 from tvm.backend.cuda.operator.tile_primitive.tma_utils import SwizzleMode
80
81 return {
82 SwizzleMode.SWIZZLE_NONE: 0,
83 SwizzleMode.SWIZZLE_32B_ATOM: 32,
84 SwizzleMode.SWIZZLE_64B_ATOM: 64,
85 SwizzleMode.SWIZZLE_128B_ATOM: 128,
86 }[swizzle_mode]
87
88
89def _suggest_swizzle_for_row_bytes(row_bytes):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…