IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo function

conv_transposed_gpu

def conv_transposed_gpu[input_type: DType, filter_type: DType, output_type: DType](output: TileTensor[output_type, Engine=output.Engine, linear_idx_type=output.linear_idx_type], input: TileTensor[input_type, Engine=input.Engine, linear_idx_type=input.linear_idx_type], filter: TileTensor[filter_type, Engine=filter.Engine, linear_idx_type=filter.linear_idx_type], stride: IndexList[(input.LayoutType.rank - Int(2))], dilation: IndexList[(input.LayoutType.rank - Int(2))], padding: IndexList[(input.LayoutType.rank - Int(2))], ctx: DeviceContext)

Runs a transposed convolution on the GPU via the cuDNN backward-data path.

Parameters:

  • ​input_type (DType): Element type of the input tensor.
  • ​filter_type (DType): Element type of the filter tensor.
  • ​output_type (DType): Element type of the output tensor.

Args:

def conv_transposed_gpu[EpilogueFnType: ConvSimdEpilogueFn, OutputLayoutType: TensorLayout, //, input_type: DType, filter_type: DType, output_type: DType](output_layout: OutputLayoutType, input: TileTensor[input_type, Engine=input.Engine, linear_idx_type=input.linear_idx_type], filter: TileTensor[filter_type, Engine=filter.Engine, linear_idx_type=filter.linear_idx_type], stride: IndexList[(input.LayoutType.rank - Int(2))], dilation: IndexList[(input.LayoutType.rank - Int(2))], padding: IndexList[(input.LayoutType.rank - Int(2))], elementwise_epilogue: EpilogueFnType, ctx: DeviceContext)

Runs a transposed convolution on the GPU via the cuDNN backward-data path and hands every output value to an elementwise epilogue.

The same convolution as the overload that takes output, for a caller whose epilogue owns every write, such as a graph op whose output is fused. cuDNN writes into a temporary buffer and a separate elementwise pass feeds it to elementwise_epilogue. The output is given as a layout, so the kernel never sees a pointer it could write through.

Parameters:

  • ​EpilogueFnType (ConvSimdEpilogueFn): Type of elementwise_epilogue (inferred).
  • ​OutputLayoutType (TensorLayout): Type of output_layout (inferred).
  • ​input_type (DType): Element type of the input tensor.
  • ​filter_type (DType): Element type of the filter tensor.
  • ​output_type (DType): Element type of the output values.

Args:

Was this page helpful?