MCPcopy Create free account
hub / github.com/NVIDIA/SOL-ExecBench / TensorSpec

Class TensorSpec

src/sol_execbench/core/data/definition.py:117–130  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

115
116
117class 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
133AxisSpec = Union[AxisConst, AxisVar, AxisExpr]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected