|
| 1 | +tilelang.intrinsics.tcgen05_macro_generator |
| 2 | +=========================================== |
| 3 | + |
| 4 | +.. py:module:: tilelang.intrinsics.tcgen05_macro_generator |
| 5 | +
|
| 6 | +
|
| 7 | +Attributes |
| 8 | +---------- |
| 9 | + |
| 10 | +.. autoapisummary:: |
| 11 | + |
| 12 | + tilelang.intrinsics.tcgen05_macro_generator.lift |
| 13 | + |
| 14 | + |
| 15 | +Classes |
| 16 | +------- |
| 17 | + |
| 18 | +.. autoapisummary:: |
| 19 | + |
| 20 | + tilelang.intrinsics.tcgen05_macro_generator.SwizzleMode |
| 21 | + tilelang.intrinsics.tcgen05_macro_generator.TensorCoreIntrinEmitter |
| 22 | + |
| 23 | + |
| 24 | +Module Contents |
| 25 | +--------------- |
| 26 | + |
| 27 | +.. py:data:: lift |
| 28 | +
|
| 29 | +.. py:class:: SwizzleMode |
| 30 | +
|
| 31 | + Bases: :py:obj:`enum.IntEnum` |
| 32 | + |
| 33 | + |
| 34 | + Enum where members are also (and must be) ints |
| 35 | + |
| 36 | + |
| 37 | + .. py:attribute:: NONE |
| 38 | + :value: 0 |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + .. py:attribute:: SWIZZLE_128B |
| 43 | + :value: 2 |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + .. py:attribute:: SWIZZLE_64B |
| 48 | + :value: 4 |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + .. py:attribute:: SWIZZLE_32B |
| 53 | + :value: 6 |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + .. py:method:: is_none() |
| 58 | +
|
| 59 | +
|
| 60 | + .. py:method:: is_swizzle_32b() |
| 61 | +
|
| 62 | +
|
| 63 | + .. py:method:: is_swizzle_64b() |
| 64 | +
|
| 65 | +
|
| 66 | + .. py:method:: is_swizzle_128b() |
| 67 | +
|
| 68 | +
|
| 69 | + .. py:method:: swizzle_byte_size() |
| 70 | +
|
| 71 | +
|
| 72 | + .. py:method:: swizzle_atom_size() |
| 73 | +
|
| 74 | +
|
| 75 | +.. py:class:: TensorCoreIntrinEmitter(a_dtype = 'float16', b_dtype = 'float16', accum_dtype = 'float16', a_transposed = False, b_transposed = False, block_row_warps = 2, block_col_warps = 2, warp_row_tiles = 8, warp_col_tiles = 8, chunk = 16, reduce_k = 1, num_elems_per_byte = 1, is_m_first = False, thread_var = None) |
| 76 | +
|
| 77 | + Bases: :py:obj:`tilelang.intrinsics.mma_macro_generator.TensorCoreIntrinEmitter` |
| 78 | + |
| 79 | + |
| 80 | + To eliminate Python syntax within TIR Macro. |
| 81 | + |
| 82 | + |
| 83 | + .. py:attribute:: tcgen05_prefix |
| 84 | + :type: str |
| 85 | + |
| 86 | + |
| 87 | + .. py:attribute:: a_shared_layout |
| 88 | + :type: tilelang.layout.Layout |
| 89 | + :value: None |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + .. py:attribute:: b_shared_layout |
| 94 | + :type: tilelang.layout.Layout |
| 95 | + :value: None |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + .. py:method:: tcgen05mma(A_buf, B_buf, C_local_buf, mbar, clear_accum = False) |
| 100 | +
|
| 101 | +
|
| 102 | + .. py:method:: make_mma_load_layout(local_buf, matrix = 'A') |
| 103 | + :abstractmethod: |
| 104 | + |
| 105 | + |
| 106 | + Create a layout function for storing MMA results into a fragment buffer. |
| 107 | + This layout is used in conjunction with `inverse_mma_store_layout` to |
| 108 | + map fragment indices to threads and local indices. |
| 109 | + |
| 110 | + :param local_buf: The local buffer representing a fragment of a matrix. |
| 111 | + :type local_buf: tir.Buffer |
| 112 | + |
| 113 | + :returns: A fragment object that describes how threads and indices |
| 114 | + in `local_buf` are laid out. |
| 115 | + :rtype: T.Fragment |
| 116 | + |
| 117 | + :raises AssertionError: If `local_buf` is not detected to be a fragment buffer. |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + .. py:method:: make_mma_store_layout(tmem_buf) |
| 122 | +
|
| 123 | + Create the TCGEN5 tensor-memory layout used to store MMA accumulators. |
| 124 | + |
| 125 | + :param tmem_buf: The local buffer representing tensormemory of a mma's output |
| 126 | + :type tmem_buf: tir.Buffer |
| 127 | + |
| 128 | + :returns: Layout object describing how logical (i, j) coordinates map to the |
| 129 | + swizzled tensor-memory offsets required by TCGEN5MMA. |
| 130 | + :rtype: Layout |
| 131 | + |
| 132 | + :raises AssertionError: If `tmem_buf` is not detected to be a tensor-memory buffer. |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + .. py:method:: get_tcgen5_mma_meta(m, n, k) |
| 137 | +
|
| 138 | +
|
| 139 | + .. py:method:: get_tcgen5_instr_desc(atom_m, atom_n, atom_k, a_is_k_major, b_is_k_major, scale_in_a, scale_in_b) |
| 140 | +
|
| 141 | +
|
0 commit comments