Abstract representation of a tensor with a (possibly ambiguous) dtype and shape, but no concrete data. Used during tracing to represent tensor metadata without actual values.
Arguments
- dtype
(
stablehlo::TensorDataType)
The data type of the tensor.- shape
(
stablehlo::Shape|integer())
The shape of the tensor. Can be provided as an integer vector.- ambiguous
(
logical(1))
Whether the type is ambiguous. Ambiguous types usually arise from R literals (e.g.,1L,1.0) and follow special promotion rules. See the vignette "Type Promotion" for more details.
Details
Two tensors are considered equal (==) if they have the same dtype and shape, ignoring ambiguity.