TraceRecordingSession

A lightweight session to convert runtime tensors to stable TensorRef ids and optionally resolve them back for diagnostics within the same run.

Notes:

  • Keys are held strongly; intended for short-lived recording windows.

  • ID policy: sequential IDs (t0, t1, ...), deterministic within the session.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun <T : DType, V> refOf(tensor: Tensor<T, V>): TensorRef

Return existing or create a new TensorRef for the given tensor.

Link copied to clipboard
fun <T : DType, V> refsOf(tensors: List<Tensor<T, V>>): List<TensorRef>

Batch conversion helper.

Link copied to clipboard
fun <T : DType, V> resolve(ref: TensorRef): Tensor<T, V>?

Diagnostics helper: best-effort resolve a TensorRef back to the runtime tensor (if still present).