Skip to main content

Mojo function

conv_shape

conv_shape[input_type: DType, filter_type: DType, strides_type: DType, dilations_type: DType, paddings_type: DType, single_thread_blocking_override: Bool](input_buf: LayoutTensor[input_type, input_buf.layout, input_buf.origin, element_layout=input_buf.element_layout, layout_int_type=input_buf.layout_int_type, linear_idx_type=input_buf.linear_idx_type, masked=input_buf.masked, alignment=input_buf.alignment], filter_buf: LayoutTensor[filter_type, filter_buf.layout, filter_buf.origin, element_layout=filter_buf.element_layout, layout_int_type=filter_buf.layout_int_type, linear_idx_type=filter_buf.linear_idx_type, masked=filter_buf.masked, alignment=filter_buf.alignment], strides_buf: LayoutTensor[strides_type, strides_buf.layout, strides_buf.origin, element_layout=strides_buf.element_layout, layout_int_type=strides_buf.layout_int_type, linear_idx_type=strides_buf.linear_idx_type, masked=strides_buf.masked, alignment=strides_buf.alignment], dilations_buf: LayoutTensor[dilations_type, dilations_buf.layout, dilations_buf.origin, element_layout=dilations_buf.element_layout, layout_int_type=dilations_buf.layout_int_type, linear_idx_type=dilations_buf.linear_idx_type, masked=dilations_buf.masked, alignment=dilations_buf.alignment], paddings_buf: LayoutTensor[paddings_type, paddings_buf.layout, paddings_buf.origin, element_layout=paddings_buf.element_layout, layout_int_type=paddings_buf.layout_int_type, linear_idx_type=paddings_buf.linear_idx_type, masked=paddings_buf.masked, alignment=paddings_buf.alignment], num_groups_scalar: Scalar[num_groups_scalar.dtype]) -> IndexList[LayoutTensor[input_type, input_buf.layout, input_buf.origin, element_layout=input_buf.element_layout, layout_int_type=input_buf.layout_int_type, linear_idx_type=input_buf.linear_idx_type, masked=input_buf.masked, alignment=input_buf.alignment].rank]

Compute the output shape of a conv operation, and assert the inputs are compatible.

Parameters:

  • input_type (DType): Type of the input tensor.
  • filter_type (DType): Type of the filter tensor.
  • strides_type (DType): Type of the strides tensor.
  • dilations_type (DType): Type of the dilations tensor.
  • paddings_type (DType): Type of the paddings tensor.
  • single_thread_blocking_override (Bool): If True, then the operation is run ssynchronouslysing a single thread.

Args:

Returns:

IndexList: The output shape.

Was this page helpful?