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

Class MatrixCoord

python/cutlass_cppgen/shape.py:49–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49class MatrixCoord:
50 def __init__(self, row, col):
51 self._row = row
52 self._col = col
53
54 @property
55 def row(self):
56 return self._row
57
58 @property
59 def column(self):
60 return self._col
61
62 def leading_dimension(self, layout: LayoutType) -> int:
63 """
64 Returns the leading dimension for a matrix with layout ``layout`` and shape provided by the MatrixCoord.
65
66 :param layout: layout of matrix
67 :type layout: cutlass_library.LayoutType
68
69 :returns: leading dimension
70 :rtype: int
71 """
72 if layout == LayoutType.RowMajor:
73 return self._col
74 elif layout == LayoutType.ColumnMajor:
75 return self._row
76 else:
77 raise Exception(f'Unsupported layout for leading dimension calculation: {layout}')
78
79
80class GemmCoord:

Callers 15

runMethod · 0.90
__init__Method · 0.90
mkMethod · 0.70
mnMethod · 0.70
knMethod · 0.70
uncompressFunction · 0.50
compute_rank2kFunction · 0.50
compute_trmm_complexFunction · 0.50
compute_trmmFunction · 0.50
compute_symm_complexFunction · 0.50
Rank2KComplexFunction · 0.50

Calls

no outgoing calls

Tested by 3

__init__Method · 0.72
verifyMethod · 0.40
verifyMethod · 0.40