View Source EXLA.Typespec (EXLA v0.9.2)
Combined type and shape information about tensors.
In addition to the Nx types, also supports {:pred, 8}
and :token
,
which are used internally within the compiler.
This struct corresponds to the xla::Shape
class in the XLA compiler,
but is also meant as a lightweight data structure for passing the
information around.
Note: the name "typespec" has been chosen intentionally to distinguish it from both "type" and "shape".
Summary
Functions
Builds a tensor typespec.
Returns an updated typespec with the given shape.
Returns an updated typespec with the given type.
Builds a token typespec.
Functions
Builds a tensor typespec.
Returns an updated typespec with the given shape.
Returns an updated typespec with the given type.
Builds a token typespec.