Skip to main content

//clika-runtime/io.clika.runtime/Ops/chunk

chunk

[common]
fun chunk(input: Tensor, numChunks: Long, dim: Long = 0): List<Tensor>

chunk(input: Tensor, numChunks: Long, dim: Long = 0L): the chunk operator. Split along dim into num_chunks near-equal parts (the last may be shorter). Returns VIEWS sharing the source's storage (one call, no copy); prefer it over repeated narrows.