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

Method strided_slice

tests/python/relax/test_op_index.py:1002–1011  ·  view source on GitHub ↗
(
            A: T.Buffer((T.int64(16), T.int64(16))),
            B: T.Buffer((T.int64(1), T.int64(16))),
            index: T.int64,
        )

Source from the content-addressed store, hash-verified

1000
1001 @T.prim_func(private=True, s_tir=True)
1002 def strided_slice(
1003 A: T.Buffer((T.int64(16), T.int64(16))),
1004 B: T.Buffer((T.int64(1), T.int64(16))),
1005 index: T.int64,
1006 ):
1007 T.func_attr({"tirx.noalias": True})
1008 for iters in T.grid(*B.shape):
1009 with T.sblock("T_dynamic_strided_slice"):
1010 i, j = T.axis.remap("SS", iters)
1011 B[i, j] = A[i + index, j]
1012
1013 after = tvm.relax.transform.LegalizeOps()(before)
1014 tvm.ir.assert_structural_equal(expected, after)

Callers 15

_narrowMethod · 0.45
roll_single_dimMethod · 0.45
_getitemMethod · 0.45
_lstm_cell_unrollMethod · 0.45
_gru_cell_unrollMethod · 0.45
_narrowMethod · 0.45
_sliceMethod · 0.45
_impl_v13Method · 0.45
convert_strided_sliceMethod · 0.45
convert_split_vMethod · 0.45

Calls 2

remapMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected