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
StaticBroadcastTo
struct StaticBroadcastTo
Implemented traitsβ
AnyType,
ImplicitlyDestructible
Methodsβ
build_viewβ
static def build_view[out_rank: Int](x: ManagedTensorSlice[Input, static_spec=x.static_spec]) -> IndexList[out_rank]
Returns:
get_view_strides_listβ
static def get_view_strides_list[out_rank: Int, in_rank: Int, input_shape: IntTuple, input_strides: IntTuple]() -> IndexList[out_rank]
Returns:
update_input_viewβ
static def update_input_view[dtype: DType, in_rank: Int, out_rank: Int, //, output_static_shape: IntTuple](x: ManagedTensorSlice[Input, static_spec=x.static_spec], output_shape: IndexList[out_rank]) -> ManagedTensorSlice[Input, static_spec=x.static_spec.with_int_tuple_layout[out_rank, output_static_shape, StaticBroadcastTo.get_view_strides_list[out_rank, in_rank, StaticTensorSpec[dtype, in_rank, x.static_spec.static_layout, x.static_spec.InFusion, x.static_spec.OutFusion, x.static_spec.ComputeFusion, x.static_spec.ComputeFusionTile].shape_tuple, StaticTensorSpec[dtype, in_rank, x.static_spec.static_layout, x.static_spec.InFusion, x.static_spec.OutFusion, x.static_spec.ComputeFusion, x.static_spec.ComputeFusionTile].strides_tuple]()]()]
Returns:
executeβ
static def execute[target: StringSlice[StaticConstantOrigin], dtype: DType, in_rank: Int, out_rank: Int, _trace_name: StringSlice[StaticConstantOrigin]](z: ManagedTensorSlice[Output, static_spec=z.static_spec], x: ManagedTensorSlice[Input, static_spec=x.static_spec], output_shape: IndexList[out_rank], ctx: DeviceContext)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!