Skip to main content
Log in

Mojo struct

RuntimeTensorSpec

@register_passable(trivial) struct RuntimeTensorSpec[type: DType, rank: Int]

Fields

  • shape (IndexList[rank]):

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, Movable, UnknownDestructibility

Methods

__init__

@implicit __init__(spec: TensorSpec) -> Self

Construct from TensorSpec.

Args:

  • spec (TensorSpec): TensorSpec of given rank and type.

__getitem__

__getitem__(self, idx: Int) -> Int

get_tensor_spec

get_tensor_spec(self) -> TensorSpec