Skip to main content

//clika-runtime/io.clika.runtime/Ops/shapeHost

shapeHost

[common]
fun shapeHost(input: Tensor): Tensor

shapeHost(input: Tensor): the shape_host operator. The shape of input as a HOST-resident Int64 tensor, written from metadata: no device kernel, no readback, no stream synchronize, whatever device input lives on. The cheap way to feed shape values to shape-consuming arguments (a reshape dim) instead of Tensor::shape()'s concrete ints.

[common]
fun shapeHost(input: Tensor, dim: Long): Tensor

shapeHost(input: Tensor, dim: Long): the shape_host operator. One dim of the shape as a 0-D Int64 host tensor (negative dim counts from the end). Same no-sync contract as shape_host(x).

[common]
fun shapeHost(input: Tensor, start: Long?, end: Long?): Tensor

shapeHost(input: Tensor, start: Long?, end: Long?): the shape_host operator. The [start, end) window of the shape (Python-slice semantics: negatives count from the end, absent bounds are open) as a 1-D Int64 host tensor.