Skip to main content

//clika-runtime/io.clika.runtime/Ops/reshape

reshape

[common]
fun reshape(input: Tensor, shape: LongArray): Tensor

reshape(input: Tensor, shape: LongArray): the reshape operator. Reshape to shape; one entry may be -1 to infer it from the element count. A dim entry is an int literal OR a 0-D/1-D integer Tensor (IndexBound); e.g. reshape(x, {shape_host(x, 1), d}) composes without reading sizes to the host.