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

Method backward_shape

python/tvm/s_tir/data_layout.py:151–164  ·  view source on GitHub ↗

Given the shape of the dst-layout, infer the src shape. Parameters ---------- shape: Array of Expr The shape in dst-layout. Returns ------- src_shape: Array of Expr The inferred shape in src-layout.

(self, shape)

Source from the content-addressed store, hash-verified

149 return _ffi_api.SBijectiveLayoutForwardShape(self, shape) # type: ignore
150
151 def backward_shape(self, shape):
152 """Given the shape of the dst-layout, infer the src shape.
153
154 Parameters
155 ----------
156 shape: Array of Expr
157 The shape in dst-layout.
158
159 Returns
160 -------
161 src_shape: Array of Expr
162 The inferred shape in src-layout.
163 """
164 return _ffi_api.SBijectiveLayoutBackwardShape(self, shape) # type: ignore
165
166
167def slayout(layout_str: str, dtype: str = "int32") -> SLayout:

Callers 1

test_bilayout_shapeFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_bilayout_shapeFunction · 0.64