Skip to main content

//clika-runtime/io.clika.runtime/TensorCallback

TensorCallback

[jvm]
fun interface TensorCallback

A callback carrying a tensor: Tensor.onComplete's notification. The Tensor handed in is the callback's for the duration of the call only: whatever reference it does not Tensor.release itself is released when the callback returns. A callback that needs the tensor past its return takes an independent reference (ClikaRtGen.tensorRetain on a handle it then owns), never the argument object.

Fires on the runtime's callback pool, never the registering thread; keep the body short and never block in it.

Functions

NameSummary
run[jvm]
abstract fun run(t: Tensor)