Specification for a tensor including shape and data type, to use as input or output of a kernel. This includes the symbolic shape (referencing defined axes) and the data type. Scalars are represented with a None shape.
| 115 | |
| 116 | |
| 117 | class TensorSpec(BaseModelWithDocstrings): |
| 118 | """Specification for a tensor including shape and data type, to use as input or output of a |
| 119 | kernel. |
| 120 | |
| 121 | This includes the symbolic shape (referencing defined axes) and the data type. |
| 122 | Scalars are represented with a None shape. |
| 123 | """ |
| 124 | |
| 125 | shape: Optional[list[NonEmptyString]] |
| 126 | """List of axis names defining the tensor shape. None for scalar values.""" |
| 127 | dtype: DType |
| 128 | """The data type of all elements in this tensor.""" |
| 129 | description: Optional[str] = None |
| 130 | """An optional human-readable description of this tensor's purpose and usage.""" |
| 131 | |
| 132 | |
| 133 | AxisSpec = Union[AxisConst, AxisVar, AxisExpr] |
nothing calls this directly
no outgoing calls
no test coverage detected