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

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

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

# splitWithSizes

[common]\
fun [splitWithSizes](splitWithSizes.md)(input: [Tensor](../Tensor/index.md), sizes: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/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;

`splitWithSizes(input: Tensor, sizes: LongArray, dim: Long = 0L)`: the `split_with_sizes` operator. Split along `dim` into chunks of the given lengths; `sizes` must sum to the dim's extent. Each length is a literal or a 0-D integer Tensor. Returns VIEWS; every chunk shares the source's storage (no copy).