File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed
python/tvm/meta_schedule/schedule_rule
src/meta_schedule/schedule_rule Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717"""Auto tensorization related components."""
18+ from typing import Optional
1819
1920from .. import _ffi_api
21+ from tvm .tir .schedule import Schedule , BlockRV , LoopRV
2022
2123
22- def tiling_with_tensor_intrin (sch , block , intrin_name ):
23- return _ffi_api .TilingwithTensorIntrin (sch , block , intrin_name )
24+ def tiling_with_tensor_intrin (sch : Schedule , block : BlockRV , intrin_name : str ) -> Optional [LoopRV ]:
25+ """Tile a subset of loops in the block according to the given tensor intrinsic.
26+
27+ Parameters
28+ ----------
29+ sch : Schedule
30+ The schedule to which tiling is applied
31+ block : BlockRV
32+ The block whose subset of loops will be tiled
33+ intrin_name : str
34+ The name of a tensor intrinsic, must be registerd via TensorIntrin.register(...) beforehand
35+
36+ Returns
37+ -------
38+ tiled_loop_rv : Optional[LoopRV]
39+ LoopRV corresponding to the outermost loop of a block tiled according to the given intrin
40+ NullOpt if no valid loop mapping is found
41+ """
42+ return _ffi_api .TilingwithTensorIntrin (sch , block , intrin_name ) # type: ignore
Original file line number Diff line number Diff line change 2424namespace tvm {
2525namespace meta_schedule {
2626
27+ /* !
28+ * \brief Tile a subset of loops in the block according to the given tensor intrinsic.
29+ * \param self The schedule to which tiling is applied
30+ * \param block_rv The block whose subset of loops will be tiled
31+ * \param intrin_name The name of a tensor intrinsic, must be registerd via
32+ * TensorIntrin.register(...) beforehand
33+ * \return LoopRV corresponding to the outermost loop of a
34+ * block tiled according to the given intrin, NullOpt if a valid loop mapping is not found
35+ */
36+
2737Optional<tir::LoopRV> TilingwithTensorIntrin (const tir::Schedule& sch, const tir::BlockRV& block_rv,
2838 const String& intrin_name);
2939
You can’t perform that action at this time.
0 commit comments