Python wrappers
Public Python APIs implemented by this engine symbol.Tile a tensor by repeating it along multiple axes.
reps[d] specifies how many times to repeat along dimension d. If
reps is longer than a.rank(), the input is conceptually left-padded
with size-1 dimensions before tiling, so the output rank equals
reps.size().
Math
where is the input's effective size along dimension .
Shape
Let r = reps.size() and n = a.rank(). After left-padding a with
max(r - n, 0) size-1 dims:
out.shape[d] = a_padded.shape[d] * reps[d] for d in [0, max(r, n)).
See Also
repeat_op — single-axis, interleaved variant.
Parameters
aTensorImplPtrrepsvector<int64_t>reps.size() > a.rank(), leading size-1 axes are virtually prepended to the input.Returns
TensorImplPtrTiled tensor with rank max(reps.size(), a.rank()) and out.shape[d] = a_padded.shape[d] * reps[d].
Notes
Backward sums the tiled gradient blocks via Dispatcher::tile_backward,
which uses the padded input shape and the repetition counts to locate each
contribution. Schema name "tile", AmpPolicy::KeepInput.
Examples
tile_op([1, 2, 3], {2}) produces [1, 2, 3, 1, 2, 3];
tile_op([[1, 2]], {2, 3}) produces a 2x6 tensor
[[1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2]].