IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo struct

StaticReshape

struct StaticReshape

Implemented traits​

AnyType, ImplicitlyDestructible

Methods​

update_input_view​

static def update_input_view[dtype: DType, output_rank: Int, //, output_static_shape: IntTuple](input: ManagedTensorSlice[Input, static_spec=input.static_spec], shape: IndexList[output_rank]) -> ManagedTensorSlice[Input, static_spec=input.static_spec.with_row_major_int_tuple_layout[output_rank, output_static_shape]()]

Returns:

ManagedTensorSlice[Input, static_spec=input.static_spec.with_row_major_int_tuple_layout[output_rank, output_static_shape]()]

execute​

static def execute[target: StringSlice[StaticConstantOrigin], _trace_name: StringSlice[StaticConstantOrigin], dtype: DType, output_rank: Int](output: ManagedTensorSlice[Output, static_spec=output.static_spec], input: ManagedTensorSlice[Input, static_spec=input.static_spec], shape: IndexList[output_rank], ctx: DeviceContext)