---
title: "splitBySize"
sidebar_label: "splitBySize"
description: "Kotlin binding reference: splitBySize."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[splitBySize](splitBySize.md)

# splitBySize

[common]\
fun [splitBySize](splitBySize.md)(input: [Tensor](../Tensor/index.md), chunkSize: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Tensor](../Tensor/index.md)&gt;

`splitBySize(input: Tensor, chunkSize: Long, dim: Long = 0L)`: the `split_by_size` operator. Split along `dim` into pieces of `chunk_size`, `ceil(extent / chunk_size)` of them, the last possibly shorter. Returns VIEWS sharing the source's storage (no copy).