Skip to main content

Mojo struct

ConvTransposedPacked

struct ConvTransposedPacked[input_element_size: Int, input_linear_idx_type: DType, filter_element_size: Int, filter_linear_idx_type: DType, output_element_size: Int, output_linear_idx_type: DType, InputLayoutType: TensorLayout, FilterLayoutType: TensorLayout, OutputLayoutType: TensorLayout, conv_attr_rank: Int, //, input_origin: ImmutOrigin, filter_origin: ImmutOrigin, output_origin: MutOrigin, input_type: DType, filter_type: DType, output_type: DType, conv_attr: ConvInfoStatic[conv_attr_rank], elementwise_epilogue: Optional[def[rank: Int](coords: IndexList[rank], f_size: Int) capturing -> None] = None]

Fields​

  • ​output (TileTensor[output_type, OutputLayoutType, output_origin, linear_idx_type=output_linear_idx_type, element_size=output_element_size]):
  • ​input (TileTensor[input_type, InputLayoutType, input_origin, linear_idx_type=input_linear_idx_type, element_size=input_element_size]):
  • ​filter (TileTensor[filter_type, FilterLayoutType, filter_origin, linear_idx_type=filter_linear_idx_type, element_size=filter_element_size]):
  • ​conv_shape (ConvShape[conv_attr_rank]):
  • ​partition (ConvPartition):
  • ​cf_tile_size (IndexList[2]):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

Methods​

run​

static run(output: TileTensor[output_type, OutputLayoutType, output_origin, linear_idx_type=output_linear_idx_type, element_size=output_element_size], input: TileTensor[input_type, InputLayoutType, input_origin, linear_idx_type=input_linear_idx_type, element_size=input_element_size], filter: TileTensor[filter_type, FilterLayoutType, filter_origin, linear_idx_type=filter_linear_idx_type, element_size=filter_element_size], conv_shape: ConvShape[conv_attr_rank], ctx: Optional[DeviceContext] = None)

input_space_loop​

input_space_loop[micro_kernel_height: Int, micro_kernel_width: Int, has_residual: Bool, last_c_tile: Bool](self, n: Int, f_tile_offset: Int, f_tile_size: Int, c_tile_offset: Int, c_tile_size: Int)

input_space_loop_2d​

input_space_loop_2d[output_dt: DType, input_dt: DType, filter_dt: DType, //, micro_kernel_height: Int, micro_kernel_width: Int, has_residual: Bool, last_c_tile: Bool](self, output: UnsafePointer[Scalar[output_dt]], input: UnsafePointer[Scalar[input_dt]], filter: UnsafePointer[Scalar[filter_dt]], n: Int, first_c_tile_in_group: Bool, c_tile_size: Int, f_tile_offset: Int, f_tile_size: Int, left_pad_impact_end: Int, right_pad_impact_start: Int)

input_space_loop_3d​

input_space_loop_3d[micro_kernel_height: Int, micro_kernel_width: Int, has_residual: Bool, last_c_tile: Bool, output_dt: DType, input_dt: DType, filter_dt: DType](self, output: UnsafePointer[Scalar[output_dt]], input: UnsafePointer[Scalar[input_dt]], filter: UnsafePointer[Scalar[filter_dt]], n: Int, first_c_tile_in_group: Bool, c_tile_size: Int, f_tile_offset: Int, f_tile_size: Int, left_pad_impact_end: Int, right_pad_impact_start: Int)

apply_epilogue​

apply_epilogue(self, n: Int, g: Int)