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
PackConvFilterShape
struct PackConvFilterShape
Implemented traitsβ
AnyType,
ImplicitlyDestructible
Methodsβ
executeβ
static def execute(filter_buf: ManagedTensorSlice[Input, static_spec=filter_buf.static_spec])
shapeβ
static def shape[rank: Int, filter_type: DType, input_shape: IntTuple, filter_shape: IntTuple, output_shape: IntTuple, strides: IntTuple, dilations: IntTuple, paddings: IntTuple, num_groups: Int](filter_buf: ManagedTensorSlice[Input, static_spec=filter_buf.static_spec]) -> IndexList[(rank + 1)]
Compute the output shape of convolution filter packing.
Parameters:
- βrank (
Int): Rank of the un-packed filter. - βfilter_type (
DType): Type of the filter. - βinput_shape (
IntTuple): NHWC layout. - βfilter_shape (
IntTuple): Filter shape. - βoutput_shape (
IntTuple): NHWC layout. - βstrides (
IntTuple): Should be rank 1 size 2. - βdilations (
IntTuple): Should be rank 1 size 2. - βpaddings (
IntTuple): Should be rank 1 size 4. - βnum_groups (
Int): The number of groups in the convolution.
Args:
- βfilter_buf (
ManagedTensorSlice[Input, static_spec=filter_buf.static_spec]): The filter to be packed.
Returns:
IndexList[(rank + 1)]: The output shape.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!