tvm_tirx.tirx.script.local_scalar#
- tvm_tirx.tirx.script.local_scalar(dtype='float32', init=None, *, name=None, annotations=None)#
Allocate scalar local storage, optionally naming and initializing it.
- Parameters:
dtype (str) – The scalar data type.
init (Any) – Initial value. None leaves the storage uninitialized; otherwise one tensor store is emitted immediately after the allocation.
name (str | None) – Optional name for the allocated tensor variable, set in place.
annotations (dict[str, Any] | None) – Annotations passed through to the allocation.
- Returns:
scalar (AlreadyEmitted[TensorLoad]) – A receipt for the load from index zero of the one-element local tensor.
- Return type: