Skip to main content
`Ctrl`+`K`

# Convolutions

MIOpen: Convolutions
Classes | Enumerations | Functions
Convolutions

## Classes

struct | miopenConvAlgoPerf_t
| Perf struct for forward, backward filter, or backward data algorithms. More...
struct | miopenConvSolution_t
| Performance struct for forward, backward filter, or backward data algorithms in immediate mode. More...

## Enumerations

enum | miopenConvFwdAlgorithm_t { miopenConvolutionFwdAlgoGEMM = 0 , miopenConvolutionFwdAlgoDirect = 1 , miopenConvolutionFwdAlgoFFT = 2 , miopenConvolutionFwdAlgoWinograd = 3 , miopenConvolutionFwdAlgoImplicitGEMM = 5 }
enum | miopenConvBwdWeightsAlgorithm_t { miopenConvolutionBwdWeightsAlgoGEMM = 0 , miopenConvolutionBwdWeightsAlgoDirect = 1 , miopenConvolutionBwdWeightsAlgoWinograd = 3 , miopenConvolutionBwdWeightsAlgoImplicitGEMM = 5 }
enum | miopenConvBwdDataAlgorithm_t { miopenConvolutionBwdDataAlgoGEMM = 0 , miopenConvolutionBwdDataAlgoDirect = 1 , miopenConvolutionBwdDataAlgoFFT = 2 , miopenConvolutionBwdDataAlgoWinograd = 3 , miopenTransposeBwdDataAlgoGEMM , miopenConvolutionBwdDataAlgoImplicitGEMM = 5 }
enum | miopenConvAlgorithm_t { miopenConvolutionAlgoGEMM = 0 , miopenConvolutionAlgoDirect = 1 , miopenConvolutionAlgoFFT = 2 , miopenConvolutionAlgoWinograd = 3 , miopenConvolutionAlgoImplicitGEMM = 5 }
enum | miopenConvolutionMode_t { miopenConvolution = 0 , miopenTranspose = 1 , miopenGroupConv = 2 , miopenDepthwise = 3 }
enum | miopenConvolutionAttrib_t { MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL , MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC , MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE }
enum | miopenConvolutionFindMode_t { miopenConvolutionFindModeNormal , miopenConvolutionFindModeFast , miopenConvolutionFindModeHybrid , miopenConvolutionFindModeDynamicHybrid , miopenConvolutionFindModeTrustVerify = 6 , miopenConvolutionFindModeTrustVerifyFull = 7 , miopenConvolutionFindModeDefault }

## Functions

| MIOPEN_DECLARE_OBJECT (miopenConvolutionDescriptor)
| Creates the miopenConvolutionDescriptor_t type.
miopenStatus_t | miopenCreateConvolutionDescriptor (miopenConvolutionDescriptor_t *convDesc)
| Creates a convolution layer descriptor.
miopenStatus_t | miopenInitConvolutionDescriptor (miopenConvolutionDescriptor_t convDesc, miopenConvolutionMode_t c_mode, int pad_h, int pad_w, int stride_h, int stride_w, int dilation_h, int dilation_w)
| Creates a 2-D convolution layer descriptor.
miopenStatus_t | miopenInitConvolutionNdDescriptor (miopenConvolutionDescriptor_t convDesc, int spatialDim, const int *padA, const int *strideA, const int *dilationA, miopenConvolutionMode_t c_mode)
| Creates a N-dimensional convolution layer descriptor.
miopenStatus_t | miopenGetConvolutionSpatialDim (miopenConvolutionDescriptor_t convDesc, int *spatialDim)
| Retrieves the spatial dimension of a convolution layer descriptor.
miopenStatus_t | miopenGetConvolutionDescriptor (miopenConvolutionDescriptor_t convDesc, miopenConvolutionMode_t *c_mode, int *pad_h, int *pad_w, int *stride_h, int *stride_w, int *dilation_h, int *dilation_w)
| Retrieves a 2-D convolution layer descriptor's details.
miopenStatus_t | miopenGetConvolutionNdDescriptor (miopenConvolutionDescriptor_t convDesc, int requestedSpatialDim, int *spatialDim, int *padA, int *strideA, int *dilationA, miopenConvolutionMode_t *c_mode)
| Retrieves a N-dimensional convolution layer descriptor's details.
miopenStatus_t | miopenGetConvolutionGroupCount (miopenConvolutionDescriptor_t convDesc, int *groupCount)
| Get the number of groups to be used in Group/Depthwise convolution.
miopenStatus_t | miopenSetConvolutionGroupCount (miopenConvolutionDescriptor_t convDesc, int groupCount)
| Set the number of groups to be used in Group/Depthwise convolution.
miopenStatus_t | miopenSetTransposeConvOutputPadding (miopenConvolutionDescriptor_t convDesc, int adj_h, int adj_w)
| Set the output padding to be used in 2-D Transpose convolution.
miopenStatus_t | miopenSetTransposeConvNdOutputPadding (miopenConvolutionDescriptor_t convDesc, int spatialDim, const int *adjA)
| Set the output padding to be used in N-dimensional Transpose convolution.
miopenStatus_t | miopenGetConvolutionForwardOutputDim (miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t inputTensorDesc, const miopenTensorDescriptor_t filterDesc, int *n, int *c, int *h, int *w)
| Get the shape of a resulting 4-D tensor from a 2-D convolution.
miopenStatus_t | miopenGetConvolutionNdForwardOutputDim (miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t inputTensorDesc, const miopenTensorDescriptor_t filterDesc, int *nDim, int *outputTensorDimA)
| Get the shape of a resulting N-dimensional tensor from a (N-2)-dimensional convolution.
miopenStatus_t | miopenDestroyConvolutionDescriptor (miopenConvolutionDescriptor_t convDesc)
| Destroys the tensor descriptor object.
miopenStatus_t | miopenSetConvolutionAttribute (miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int value)
| Set the attribute of the convolution descriptor.
miopenStatus_t | miopenGetConvolutionAttribute (miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int *value)
| Get the attribute of the convolution descriptor.
miopenStatus_t | miopenSetConvolutionFindMode (miopenConvolutionDescriptor_t convDesc, miopenConvolutionFindMode_t findMode)
| Sets the Find Mode attribute in the convolution descriptor.
miopenStatus_t | miopenGetConvolutionFindMode (const miopenConvolutionDescriptor_t convDesc, miopenConvolutionFindMode_t *findMode)
| Reads the Find Mode attribute from the convolution descriptor.
miopenStatus_t | miopenConvolutionForwardGetSolutionCount (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, size_t *solutionCount)
| Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for Convolution in the Forward direction.
miopenStatus_t | miopenConvolutionForwardGetSolution (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
| Query the applicable solutions for a convolution configuration described by input, output and convolution descriptors.
miopenStatus_t | miopenConvolutionForwardGetSolutionWorkspaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const uint64_t solution_id, size_t *workSpaceSize)
| Returns the workspace size required for a particular solution id.
miopenStatus_t | miopenConvolutionForwardCompileSolution (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, const uint64_t solution_id)
| Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionForwardGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionForwardImmediate does not cause a compile.
miopenStatus_t | miopenConvolutionForwardImmediate (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, void *y, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
| Executes the Forward convolution operation based on the provided solution ID.
miopenStatus_t | miopenConvolutionBackwardDataGetSolutionCount (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, size_t *solutionCount)
| Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for backward Convolution w-r-t Data.
miopenStatus_t | miopenConvolutionBackwardDataGetSolution (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
| Query the applicable solutions for a backward convolution w-r-t data as described by input, output and convolution descriptors.
miopenStatus_t | miopenConvolutionBackwardDataGetSolutionWorkspaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const uint64_t solution_id, size_t *workSpaceSize)
| Returns the workspace size required for a particular solution id.
miopenStatus_t | miopenConvolutionBackwardDataCompileSolution (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, const uint64_t solution_id)
| Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBackwardDataGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionBackwardDataImmediate does not cause a compile.
miopenStatus_t | miopenConvolutionBackwardDataImmediate (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
| Executes the Backward convolution w-r-t data operation based on the provided solution ID.
miopenStatus_t | miopenConvolutionBackwardWeightsGetSolutionCount (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, size_t *solutionCount)
| Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for backward Convolution w-r-t Weights.
miopenStatus_t | miopenConvolutionBackwardWeightsGetSolution (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const size_t maxSolutionCount, size_t *solutionCount, miopenConvSolution_t *solutions)
| Query the applicable solutions for a backward convolution w-r-t weights as described by input, output and convolution descriptors.
miopenStatus_t | miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const uint64_t solution_id, size_t *workSpaceSize)
| Returns the workspace size required for a particular solution id.
miopenStatus_t | miopenConvolutionBackwardWeightsCompileSolution (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, const uint64_t solution_id)
| Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBackwardWeightsGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionBackwardWeightsImmediate does not cause a compile.
miopenStatus_t | miopenConvolutionBackwardWeightsImmediate (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceSize, const uint64_t solution_id)
| Executes the Backward convolution w-r-t weights operation based on the provided solution ID.
miopenStatus_t | miopenConvolutionForwardGetWorkSpaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t wDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
| Query the workspace size required for a forward convolution algorithm.

miopenStatus_t

miopenFindConvolutionForwardAlgorithm (miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t yDesc, void *y, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)

| Search and run the forward convolutional algorithms and return a list of kernel times.
miopenStatus_t | miopenConvolutionForward (miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvFwdAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, void *workSpace, size_t workSpaceSize)
| Execute a forward convolution layer.
miopenStatus_t | miopenConvolutionForwardBias (miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t bDesc, const void *b, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
| Calculate element-wise scale and shift of a tensor via a bias tensor.
miopenStatus_t | miopenConvolutionBackwardDataGetWorkSpaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, size_t *workSpaceSize)
| Query the workspace size required for a backward data convolution algorithm.

miopenStatus_t

miopenFindConvolutionBackwardDataAlgorithm (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, void *dx, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)

| Search and run the backwards data convolution algorithms and return a list of kernel times.
miopenStatus_t | miopenConvolutionBackwardData (miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvBwdDataAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace, size_t workSpaceSize)
| Execute a backward data convolution layer.
miopenStatus_t | miopenConvolutionBackwardWeightsGetWorkSpaceSize (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t xDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, size_t *workSpaceSize)
| Get the GPU memory required for the backward weights convolution algorithm.

miopenStatus_t

miopenFindConvolutionBackwardWeightsAlgorithm (miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dwDesc, void *dw, const int requestAlgoCount, int *returnedAlgoCount, miopenConvAlgoPerf_t *perfResults, void *workSpace, size_t workSpaceSize, bool exhaustiveSearch)

| Search and run the backwards weights convolutional algorithms and return a list of kernel times.
miopenStatus_t | miopenConvolutionBackwardWeights (miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const miopenConvolutionDescriptor_t convDesc, miopenConvBwdWeightsAlgorithm_t algo, const void *beta, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceSize)
| Execute a backward weights convolution layer.
miopenStatus_t | miopenConvolutionBackwardBias (miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dbDesc, void *db)
| Calculates the gradient with respect to the bias.

## Detailed Description

## Enumeration Type Documentation

## ◆ miopenConvAlgorithm_t

enum miopenConvAlgorithm_t

Top-level convolutional algorithm mode

Enumerator
miopenConvolutionAlgoGEMM | GEMM variant
miopenConvolutionAlgoDirect | Direct convolutions
miopenConvolutionAlgoFFT | Fast Fourier Transform indirect convolutions
miopenConvolutionAlgoWinograd | Winograd indirect convolutions
miopenConvolutionAlgoImplicitGEMM | Implicit GEMM convolutions

## ◆ miopenConvBwdDataAlgorithm_t

enum miopenConvBwdDataAlgorithm_t

Convolutional algorithm mode for back propagation on data.

Enumerator
miopenConvolutionBwdDataAlgoGEMM | GEMM variant
miopenConvolutionBwdDataAlgoDirect | Direct convolutions
miopenConvolutionBwdDataAlgoFFT | Fast Fourier Transform indirect convolutions
miopenConvolutionBwdDataAlgoWinograd | Winograd indirect convolutions
miopenTransposeBwdDataAlgoGEMM | Deprecated Transpose GEMM variant legacy, ToBe Removed
miopenConvolutionBwdDataAlgoImplicitGEMM | Implicit GEMM convolutions

## ◆ miopenConvBwdWeightsAlgorithm_t

enum miopenConvBwdWeightsAlgorithm_t

Convolutional algorithm mode for back propagation on weights.

Enumerator
miopenConvolutionBwdWeightsAlgoGEMM | GEMM variant
miopenConvolutionBwdWeightsAlgoDirect | Direct convolution algorithm
miopenConvolutionBwdWeightsAlgoWinograd | Winograd convolutions
miopenConvolutionBwdWeightsAlgoImplicitGEMM | Implicit GEMM convolutions

## ◆ miopenConvFwdAlgorithm_t

enum miopenConvFwdAlgorithm_t

Convolutional algorithm mode for forward propagation. MIOpen use cross-correlation for its convolution implementation.

Enumerator
miopenConvolutionFwdAlgoGEMM | GEMM variant
miopenConvolutionFwdAlgoDirect | Direct convolutions
miopenConvolutionFwdAlgoFFT | Fast Fourier Transform indirect convolutions
miopenConvolutionFwdAlgoWinograd | Winograd indirect convolutions
miopenConvolutionFwdAlgoImplicitGEMM | Implicit GEMM convolutions

## ◆ miopenConvolutionAttrib_t

enum miopenConvolutionAttrib_t

Attribute for convolution descriptor, used for alternating the convolution behavior

Enumerator
MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL | Use alternative fp16 implementation. Only supported for gfx90a; has no effect for other targets. 0 - disabled, 1 - enabled, -1 or unset - default (F0B1W1) >
MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC | Restrict MIOpen convolutions to kernels which produce numerically deterministic results. 0 - disabled (default), 1 - enabled >
MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE | Specifies the rounding mode for the 8-bit floating data types. Currently, two rounding modes are supported miopenF8RoundingModeStandard and miopenF8RoundingModeStochastic. These are listed as part of the miopenF8RoundingMode_t enum.>

## ◆ miopenConvolutionFindMode_t

enum miopenConvolutionFindMode_t

Findmode for convolution descriptor, used for changing the find behavior when calling miopenFindConvolutionForwardAlgorithm(), miopenFindConvolutionBackwardDataAlgorithm(), or miopenFindConvolutionBackwardWeightsAlgorithm().

Enumerator
miopenConvolutionFindModeNormal | Full Find mode call, which will benchmark all the solvers and return a list. >
miopenConvolutionFindModeFast | Checks the Find-db for an entry. If there is a hit, use that entry. If there is a miss, utilize the Immediate mode fallback. Start-up times are expected to be faster, but with worse GPU performance. >
miopenConvolutionFindModeHybrid | Checks the Find-db for an entry. If there is a hit, use that entry. If there is a miss, use the existing Find machinery. Slower start-up times than Fast Find, but better GPU performance. >
miopenConvolutionFindModeDynamicHybrid | Checks the Find-db for an entry. If there is a hit, uses that entry. If there is a miss, uses the existing Find machinery with skipping non-dynamic kernels, thus saving compilation time. Faster start-up times than Hybrid Find, but GPU performance might be a bit worse. >
miopenConvolutionFindModeTrustVerify |
miopenConvolutionFindModeTrustVerifyFull |
miopenConvolutionFindModeDefault | Default FindMode >

## ◆ miopenConvolutionMode_t

enum miopenConvolutionMode_t

Convolution mode selection for convolution layer preference.

Enumerator
miopenConvolution | Cross-Correlation convolution
miopenTranspose | Transpose convolutions – deconvolution
miopenGroupConv | Deprecated Group convolution legacy, ToBe Removed
miopenDepthwise | Deprecated Depthwise convolution legacy, ToBe Removed

## Function Documentation

## ◆ MIOPEN_DECLARE_OBJECT()

MIOPEN_DECLARE_OBJECT | ( | miopenConvolutionDescriptor |  | ) |

Creates the miopenConvolutionDescriptor_t type.

Convolution descriptor is an object that allows the user to specify a layer's padding, stride, and dilation of the convolutional filter. Parameters must all be non-negative.

## ◆ miopenConvolutionBackwardBias()

miopenStatus_t miopenConvolutionBackwardBias | ( | miopenHandle_t | handle,
|  | const void * | alpha,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const void * | beta,
|  | const miopenTensorDescriptor_t | dbDesc,
|  | void * | db )

Calculates the gradient with respect to the bias.

Compute the convolution backwards gradient with respect to the bias tensor. The scaling parameter alpha (float) and shift parameter beta (float) are only supported for alpha = 1 and beta = 0.

Parameters

  handle | MIOpen handle (input)
  alpha | Floating point scaling factor, allocated on the host (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  dy | Data delta tensor dy (input)
  beta | Floating point shift factor, allocated on the host (input)
  dbDesc | Tensor descriptor for input bias tensor db (input)
  db | Bias delta tensor db (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardData()

miopenStatus_t miopenConvolutionBackwardData | ( | miopenHandle_t | handle,
|  | const void * | alpha,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvBwdDataAlgorithm_t | algo,
|  | const void * | beta,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | void * | dx,
|  | void * | workSpace,
|  | size_t | workSpaceSize )

Execute a backward data convolution layer.

Runs the backward data convolution layer based on the selected algorithm. The function miopenFindConvolutionBackwardDataAlgorithm() must have been executed previously to determine the required memory needed for the workspace and the best convolutional algorithm.

The backward data convolution is designed to accommodate both packed and non-packed tensor strides for multiple data types and dimensions across various platforms. This flexibility ensures optimal performance in handling diverse computational scenarios. To configure tensor parameters, including strides, users can utilize the APIs miopenSetTensorDescriptor() and miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor information, facilitating a more intuitive and efficient workflow. The tensor strides are non-packed by default.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  alpha | Floating point scaling factor, allocated on the host (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  dy | Data delta tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (input)
  convDesc | Convolution layer descriptor (input)
  algo | Algorithm selected (input)
  beta | Floating point shift factor, allocated on the host (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  dx | Data delta tensor dx (output)
  workSpace | Pointer to workspace required for the search (input)
  workSpaceSize | Size in bytes of the memory needed for find (input)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataCompileSolution()

miopenStatus_t miopenConvolutionBackwardDataCompileSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | const uint64_t | solution_id )

Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBackwardDataGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionBackwardDataImmediate does not cause a compile.

This is an optional step and may be skipped if a slow first miopenConvolutionBackwardDataImmediate invocation is acceptable.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataGetSolution()

miopenStatus_t miopenConvolutionBackwardDataGetSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | const size_t | maxSolutionCount,
|  | size_t * | solutionCount,
|  | miopenConvSolution_t * | solutions )

Query the applicable solutions for a backward convolution w-r-t data as described by input, output and convolution descriptors.

The returned solutions array is sorted in the order of decreasing performance. The returned solutions ns might be based on heuristics and for more consistent performance results the user the advised to run the Find step. The maximum length of the solutions array may be queried using miopenConvolutionBackwardDataGetSolutionCount

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  maxSolutionCount | The size of the solutions array passed in below (input)
  solutionCount | The size of the solutions array returned (output)
  solutions | A pointer to an array of type miopenConvSolution_t allocated by the user, filled in by MIOpen with applicable solutions. (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataGetSolutionCount()

miopenStatus_t miopenConvolutionBackwardDataGetSolutionCount | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | size_t * | solutionCount )

Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for backward Convolution w-r-t Data.

This call returns the maximum number of applicable solutions for a the convolution problem, the number returned may be used to allocate the memory required for the miopenConvAlgoPert2_t which is required by miopenConvolutionBackwardDataGetSolution API calls.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  solutionCount | Pointer to memory to return number of applicable solutions (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataGetSolutionWorkspaceSize()

miopenStatus_t miopenConvolutionBackwardDataGetSolutionWorkspaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | const uint64_t | solution_id,
|  | size_t * | workSpaceSize )

Returns the workspace size required for a particular solution id.

This is an optional call for users who may have serialized the solution id and just need the workspace size for it. The same information is returned by the miopenConvolutionBackwardDataGetSolution as part of the miopenConvSolution_t struct.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  solution_id | ID of the solution for which workspace size is required (input)
  workSpaceSize | The size of the workspace (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataGetWorkSpaceSize()

miopenStatus_t miopenConvolutionBackwardDataGetWorkSpaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | size_t * | workSpaceSize )

Query the workspace size required for a backward data convolution algorithm.

For given tensor and convolution descriptors, this function calculates and returns the minimum size of the workspace that must be provided to miopenFindConvolutionBackwardDataAlgorithm() in order for the latter to find the best candidate from the available backward data convolution algorithms.

WARNING: Providing smaller workspace may result in the selection of a slow convolution algorithm, and therefore affect library performance.

It should be assumed that the required workspace size is different for each convolution configuration. Therefore, typically this function should be called at least once for each convolution configuration used.

Since the convolution configuration is determined by tensor and convolution descriptors, the user should ensure that all descriptors contain complete information. For example, if Group/Depthwise convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running this, and so on.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  workSpaceSize | Size in bytes of the memory required (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardDataImmediate()

miopenStatus_t miopenConvolutionBackwardDataImmediate | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | void * | dx,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | const uint64_t | solution_id )

Executes the Backward convolution w-r-t data operation based on the provided solution ID.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  dy | Data delta tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  dx | Data delta tensor dx (output)
  workSpace | Workspace tensor (input)
  workSpaceSize | Size in bytes of the workspace memory pointed to by workSpace
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeights()

miopenStatus_t miopenConvolutionBackwardWeights | ( | miopenHandle_t | handle,
|  | const void * | alpha,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvBwdWeightsAlgorithm_t | algo,
|  | const void * | beta,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | void * | dw,
|  | void * | workSpace,
|  | size_t | workSpaceSize )

Execute a backward weights convolution layer.

Runs the backward weights convolution layer based on the selected algorithm. The function miopenFindConvolutionBackwardWeightsAlgorithm() must have been executed previously to determine the required memory needed for the workspace and the best convolutional algorithm.

The backward weights convolution is designed to accommodate both packed and non-packed tensor strides for multiple data types and dimensions across various platforms. This flexibility ensures optimal performance in handling diverse computational scenarios. To configure tensor parameters, including strides, users can utilize the APIs miopenSetTensorDescriptor() and miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor information, facilitating a more intuitive and efficient workflow. The tensor strides are non-packed by default.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  alpha | Floating point scaling factor, allocated on the host (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  dy | Data delta tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  x | Data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  algo | Algorithm selected (input)
  beta | Floating point shift factor, allocated on the host (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  dw | Weights delta tensor dw (output)
  workSpace | Pointer to workspace required for the search (input)
  workSpaceSize | Size in bytes of the memory needed for find (input)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsCompileSolution()

miopenStatus_t miopenConvolutionBackwardWeightsCompileSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | const uint64_t | solution_id )

Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionBackwardWeightsGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionBackwardWeightsImmediate does not cause a compile.

This is an optional step and may be skipped if a slow first miopenConvolutionBackwardWeightsImmediate invocation is acceptable.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsGetSolution()

miopenStatus_t miopenConvolutionBackwardWeightsGetSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | const size_t | maxSolutionCount,
|  | size_t * | solutionCount,
|  | miopenConvSolution_t * | solutions )

Query the applicable solutions for a backward convolution w-r-t weights as described by input, output and convolution descriptors.

The returned solutions array is sorted in the order of decreasing performance. The returned solutions might be based on heuristics and for more consistent performance results the user the advised to run the Find step. The maximum length of the solutions array may be queried using miopenConvolutionBackwardWeightsGetSolutionCount

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  maxSolutionCount | The size of the solutions array passed in below (input)
  solutionCount | The size of the solutions array returned (output)
  solutions | A pointer to an array of type miopenConvSolution_t allocated by the user, filled in by MIOpen with applicable solutions. (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsGetSolutionCount()

miopenStatus_t miopenConvolutionBackwardWeightsGetSolutionCount | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | size_t * | solutionCount )

Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for backward Convolution w-r-t Weights.

This call returns the maximum number of applicable solutions for a the convolution problem, the number returned may be used to allocate the memory required for the miopenConvAlgoPert2_t which is required by miopenConvolutionBackwardWeightsGetSolution API calls.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  solutionCount | Pointer to memory to return number of applicable solutions (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize()

miopenStatus_t miopenConvolutionBackwardWeightsGetSolutionWorkspaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | const uint64_t | solution_id,
|  | size_t * | workSpaceSize )

Returns the workspace size required for a particular solution id.

This is an optional call for users who may have serialized the solution id and just need the workspace size for it. The same information is returned by the miopenConvolutionBackwardWeightsGetSolution as part of the miopenConvSolution_t struct.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  solution_id | ID of the solution for which workspace size is required (input)
  workSpaceSize | The size of the workspace (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsGetWorkSpaceSize()

miopenStatus_t miopenConvolutionBackwardWeightsGetWorkSpaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | size_t * | workSpaceSize )

Get the GPU memory required for the backward weights convolution algorithm.

For given tensor and convolution descriptors, this function calculates and returns the minimum size of the workspace that must be provided to miopenFindConvolutionBackwardWeightsAlgorithm() in order for the latter to find the best candidate from the available backward weights convolution algorithms.

WARNING: Providing smaller workspace may result in the selection of a slow convolution algorithm, and therefore affect library performance.

It should be assumed that the required workspace size is different for each convolution configuration. Therefore, typically this function should be called at least once for each convolution configuration used.

Since the convolution configuration is determined by tensor and convolution descriptors, the user should ensure that all descriptors contain complete information. For example, if Group/Depthwise convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running this, and so on.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for output weights tensor dw (input)
  workSpaceSize | Size in bytes of the memory required (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionBackwardWeightsImmediate()

miopenStatus_t miopenConvolutionBackwardWeightsImmediate | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | void * | dw,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | const uint64_t | solution_id )

Executes the Backward convolution w-r-t weights operation based on the provided solution ID.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data tensor dy (input)
  dy | Data delta tensor dy (input)
  xDesc | Tensor descriptor for data tensor x (input)
  x | Data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  dw | Weights delta tensor dw (output)
  workSpace | Workspace tensor (input)
  workSpaceSize | Size in bytes of the memory passed in, pointed to by workSpace pointer above
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenConvolutionForward()

miopenStatus_t miopenConvolutionForward | ( | miopenHandle_t | handle,
|  | const void * | alpha,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvFwdAlgorithm_t | algo,
|  | const void * | beta,
|  | const miopenTensorDescriptor_t | yDesc,
|  | void * | y,
|  | void * | workSpace,
|  | size_t | workSpaceSize )

Execute a forward convolution layer.

Runs the forward convolution layer based on the selected algorithm. The function miopenFindConvolutionForwardAlgorithm() must have been executed previously to determine the required memory needed for the workspace and the best convolutional algorithm. The scaling parameter alpha (float) and shift parameter beta (float) are only supported for alpha = 1 and beta = 0 in 2D. In 3D, these parameters can take other values.

The forward convolution is designed to accommodate both packed and non-packed tensor strides for multiple data types and dimensions across various platforms. This flexibility ensures optimal performance in handling diverse computational scenarios. To configure tensor parameters, including strides, users can utilize the APIs miopenSetTensorDescriptor() and miopenGetTensorDescriptor(). These APIs empower developers to seamlessly set and retrieve tensor information, facilitating a more intuitive and efficient workflow. The tensor strides are non-packed by default.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  alpha | Floating point scaling factor, allocated on the host (input)
  xDesc | Tensor descriptor for data input tensor x (input)
  x | Data tensor x (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (inputs)
  convDesc | Convolution layer descriptor (inputs)
  algo | Algorithm selected (inputs)
  beta | Floating point shift factor, allocated on the host (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  y | Data tensor y (output)
  workSpace | Pointer to workspace required (input)
  workSpaceSize | Size in bytes of the memory determined by the find step (input)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardBias()

miopenStatus_t miopenConvolutionForwardBias | ( | miopenHandle_t | handle,
|  | const void * | alpha,
|  | const miopenTensorDescriptor_t | bDesc,
|  | const void * | b,
|  | const void * | beta,
|  | const miopenTensorDescriptor_t | yDesc,
|  | void * | y )

Calculate element-wise scale and shift of a tensor via a bias tensor.

This function applies an element-wise bias to a data tensor from an input bias tensor. The scaling parameter alpha (float) and shift parameter beta (float) are only supported for alpha = 1 and beta = 0.

Parameters

  handle | MIOpen handle (input)
  alpha | Floating point scaling factor, allocated on the host (input)
  bDesc | Tensor descriptor for bias tensor b (input)
  b | Bias tensor b (input)
  beta | Floating point shift factor, allocated on the host (input)
  yDesc | Tensor descriptor for data tensor y (input)
  y | Data tensor y (input and output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardCompileSolution()

miopenStatus_t miopenConvolutionForwardCompileSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | const uint64_t | solution_id )

Compiles the solution provided by the user, this solution may be acquired by the miopenConvolutionForwardGetSolution API call above. Compiling the solution ensures that the first API call to miopenConvolutionForwardImmediate does not cause a compile.

This is an optional step and may be skipped if a slow first miopenConvolutionForwardImmediate invocation is acceptable.

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardGetSolution()

miopenStatus_t miopenConvolutionForwardGetSolution | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | const size_t | maxSolutionCount,
|  | size_t * | solutionCount,
|  | miopenConvSolution_t * | solutions )

Query the applicable solutions for a convolution configuration described by input, output and convolution descriptors.

The returned solutions array is sorted in the order of decreasing performance. The returned solutions might be based on heuristics and for more consistent performance results the user the advised to run the Find step. The maximum length of the solutions array may be queried using miopenConvolutionForwardGetSolutionCount

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  maxSolutionCount | The size of the solutions array passed in below (input)
  solutionCount | The size of the solutions array returned (output)
  solutions | A pointer to an array of type miopenConvSolution_t allocated by the user, filled in by MIOpen with applicable solutions. (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardGetSolutionCount()

miopenStatus_t miopenConvolutionForwardGetSolutionCount | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | size_t * | solutionCount )

Query the maximum number of solutions applicable for the given input/output and weights tensor descriptor for Convolution in the Forward direction.

This call returns the maximum number of applicable solutions for a forward convolution problem. The `solutionCount` returned may be used to allocate the memory required for the `miopenConvAlgoPerf_t` which is required by miopenConvolutionGetSolution API calls.

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  solutionCount | Pointer to memory to return number of applicable solutions (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardGetSolutionWorkspaceSize()

miopenStatus_t miopenConvolutionForwardGetSolutionWorkspaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | const uint64_t | solution_id,
|  | size_t * | workSpaceSize )

Returns the workspace size required for a particular solution id.

This is an optional call for users who may have serialized the solution id and just need the workspace size for it. The same information is returned by the miopenConvolutionForwardGetSolution as part of the miopenConvSolution_t struct.

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  solution_id | ID of the solution for which workspace size is required (input)
  workSpaceSize | The size of the workspace (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardGetWorkSpaceSize()

miopenStatus_t miopenConvolutionForwardGetWorkSpaceSize | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | size_t * | workSpaceSize )

Query the workspace size required for a forward convolution algorithm.

For given tensor and convolution descriptors, this function calculates and returns the minimum size of the workspace that must be provided to miopenFindConvolutionForwardAlgorithm() in order for the latter to find the best candidate from the available forward data convolution algorithms.

WARNING: Providing smaller workspace may result in the selection of a slow convolution algorithm, and therefore affect library performance.

It should be assumed that the required workspace size is different for each convolution configuration. Therefore, typically this function should be called at least once for each convolution configuration used.

Since the convolution configuration is determined by tensor and convolution descriptors, the user should ensure that all descriptors contain complete information. For example, if Group/Depthwise convolution mode is used, then miopenSetConvolutionGroupCount() should be called before running this, and so on.

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  workSpaceSize | Pointer to memory to return size in bytes (output)

Returns
  miopenStatus_t

## ◆ miopenConvolutionForwardImmediate()

miopenStatus_t miopenConvolutionForwardImmediate | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | void * | y,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | const uint64_t | solution_id )

Executes the Forward convolution operation based on the provided solution ID.

Supported datatypes are fp32, fp16, bfp16, and int8

Parameters

  handle | MIOpen handle (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (input)
  xDesc | Tensor descriptor for input data tensor x (input)
  x | Data tensor x (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  y | Data tensor y (output)
  workSpace | Workspace tensor (input)
  workSpaceSize | Size of the memory in bytes pointed to by workSpace above
  solution_id | ID of the solution to be compiled, as chosen by the user

Returns
  miopenStatus_t

## ◆ miopenCreateConvolutionDescriptor()

miopenStatus_t miopenCreateConvolutionDescriptor | ( | miopenConvolutionDescriptor_t * | convDesc | ) |

Creates a convolution layer descriptor.

Parameters

  convDesc | Convolution layer descriptor

Returns
  miopenStatus_t

## ◆ miopenDestroyConvolutionDescriptor()

miopenStatus_t miopenDestroyConvolutionDescriptor | ( | miopenConvolutionDescriptor_t | convDesc | ) |

Destroys the tensor descriptor object.

Parameters

  convDesc | Convolution tensor descriptor type (input)

Returns
  miopenStatus_t

## ◆ miopenFindConvolutionBackwardDataAlgorithm()

miopenStatus_t miopenFindConvolutionBackwardDataAlgorithm | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dxDesc,
|  | void * | dx,
|  | const int | requestAlgoCount,
|  | int * | returnedAlgoCount,
|  | miopenConvAlgoPerf_t * | perfResults,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | bool | exhaustiveSearch )

Search and run the backwards data convolution algorithms and return a list of kernel times.

This function attempts all MIOpen backward data convolution algorithms, and outputs the performance metrics to a user-allocated array of type miopenConvAlgoPerf_t. These metrics are written in sorted fashion where the first element has the lowest compute time. This function is mandatory before using backwards convolutions. Users can chose the top-most algorithm if they only care about the fastest algorithm.

This function is mandatory before using miopenConvolutionBackwardData(). In order to execute this function, miopenConvolutionBackwardsDataGetWorkSpaceSize() must be run to determine the required memory for this search.

- If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If a configuration match is not found, a default configuration will be returned.
- If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration. If a match is not found, an exhaustive search is performed by running individual algorithms.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  dy | Data delta tensor dy (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (input)
  convDesc | Convolution layer descriptor (input)
  dxDesc | Tensor descriptor for output data tensor dx (input)
  dx | Data delta tensor dx (input)
  requestAlgoCount | Number of algorithms to return kernel times (input)
  returnedAlgoCount | Pointer to number of algorithms returned (output)
  perfResults | Pointer to union of best algorithm for forward and backwards (output)
  workSpace | Pointer to workspace buffer (input).
  workSpaceSize | Size in bytes of the workspace buffer (input). The buffer must be allocated on the device by the caller. The size of the buffer should be determined by calling miopenConvolutionBackwardDataGetWorkSpaceSize(), see its documentation for details.
  exhaustiveSearch | A boolean to toggle a full search of all algorithms and configurations (input)

Returns
  miopenStatus_t

## ◆ miopenFindConvolutionBackwardWeightsAlgorithm()

miopenStatus_t miopenFindConvolutionBackwardWeightsAlgorithm | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | dyDesc,
|  | const void * | dy,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | dwDesc,
|  | void * | dw,
|  | const int | requestAlgoCount,
|  | int * | returnedAlgoCount,
|  | miopenConvAlgoPerf_t * | perfResults,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | bool | exhaustiveSearch )

Search and run the backwards weights convolutional algorithms and return a list of kernel times.

This function attempts all MIOpen backward weights convolution algorithms, and outputs the performance metrics to a user-allocated array of type miopenConvAlgoPerf_t. These metrics are written in sorted fashion where the first element has the lowest compute time. This function is mandatory before using backwards weight convolutions. Users can chose the top-most algorithm if they only care about the fastest algorithm.

This function is mandatory before using miopenConvolutionBackwardWeights(). In order to execute this function, miopenConvolutionBackwardsWeightsGetWorkSpaceSize() must be run to determine the required memory for this search.

- If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If a configuration match is not found, a default configuration will be returned.
- If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration. If a match is not found, an exhaustive search is performed by running individual algorithms.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  dyDesc | Tensor descriptor for data input tensor dy (input)
  dy | Data delta tensor dy (input)
  xDesc | Tensor descriptor for output data tensor x (input)
  x | Data delta tensor dx (input)
  convDesc | Convolution layer descriptor (input)
  dwDesc | Tensor descriptor for weight tensor dw (input)
  dw | Weights delta tensor dw (input)
  requestAlgoCount | Number of algorithms to return kernel times (input)
  returnedAlgoCount | Pointer to number of algorithms returned (output)
  perfResults | Pointer to union of best algorithm for forward and backwards (output)
  workSpace | Pointer to workspace buffer (input).
  workSpaceSize | Size in bytes of the workspace buffer (input). The buffer must be allocated on the device by the caller. The size of the buffer should be determined by calling miopenConvolutionBackwardWeightsGetWorkSpaceSize(), see its documentation for details.
  exhaustiveSearch | A boolean to toggle a full search of all algorithms and configurations (input)

Returns
  miopenStatus_t

## ◆ miopenFindConvolutionForwardAlgorithm()

miopenStatus_t miopenFindConvolutionForwardAlgorithm | ( | miopenHandle_t | handle,
|  | const miopenTensorDescriptor_t | xDesc,
|  | const void * | x,
|  | const miopenTensorDescriptor_t | wDesc,
|  | const void * | w,
|  | const miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | yDesc,
|  | void * | y,
|  | const int | requestAlgoCount,
|  | int * | returnedAlgoCount,
|  | miopenConvAlgoPerf_t * | perfResults,
|  | void * | workSpace,
|  | size_t | workSpaceSize,
|  | bool | exhaustiveSearch )

Search and run the forward convolutional algorithms and return a list of kernel times.

This function attempts all MIOpen forward convolution algorithms based on the input configuration, and outputs performance metrics to a user-allocated array of type miopenConvAlgoPerf_t. These metrics are written in a sorted fashion where the first element has the lowest compute time. Users can chose the top-most algorithm if they only care about the fastest algorithm.

This function is mandatory before using miopenConvolutionForward(). In order to execute this function, miopenConvolutionForwardGetWorkSpaceSize() must be run to determine the required memory for this search.

- If exhaustiveSearch == 0, MIOpen will look for the first kernel with a configuration match. If a configuration match is not found, a default configuration will be returned.
- If exhaustiveSearch == 1, MIOpen will look for the best kernel for the provided configuration. If a match is not found, an exhaustive search is performed by running individual algorithms.

If using Group/Depthwise convolution mode, call miopenSetConvolutionGroupCount() before running this.

Parameters

  handle | MIOpen handle (input)
  xDesc | Tensor descriptor for data input tensor x (input)
  x | Data tensor x (input)
  wDesc | Tensor descriptor for weight tensor w (input)
  w | Weights tensor w (input)
  convDesc | Convolution layer descriptor (input)
  yDesc | Tensor descriptor for output data tensor y (input)
  y | Data tensor y (output)
  requestAlgoCount | Number of algorithms to return kernel times (input)
  returnedAlgoCount | Pointer to number of algorithms returned (output)
  perfResults | Pointer to union of best algorithm for forward and backwards (input)
  workSpace | Pointer to workspace buffer (input).
  workSpaceSize | Size in bytes of the workspace buffer (input). The buffer must be allocated on the device by the caller. The size of the buffer should be determined by calling miopenConvolutionForwardGetWorkSpaceSize(), see its documentation for details.
  exhaustiveSearch | A boolean to toggle a full search of all algorithms and configurations (input)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionAttribute()

miopenStatus_t miopenGetConvolutionAttribute | ( | miopenConvolutionDescriptor_t | convDesc,
|  | const miopenConvolutionAttrib_t | attr,
|  | int * | value )

Get the attribute of the convolution descriptor.

Parameters

  convDesc | Convolution layer descriptor (input)
  attr | Attribute of this convolution to get (input)
  value | Value of this attribute (output)

## ◆ miopenGetConvolutionDescriptor()

miopenStatus_t miopenGetConvolutionDescriptor | ( | miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvolutionMode_t * | c_mode,
|  | int * | pad_h,
|  | int * | pad_w,
|  | int * | stride_h,
|  | int * | stride_w,
|  | int * | dilation_h,
|  | int * | dilation_w )

Retrieves a 2-D convolution layer descriptor's details.

For group/depthwise convolution dilation height and width, only a dilation value of 1 is supported.

Parameters

  convDesc | Convolution layer descriptor (input)
  c_mode | Convolutional mode (output)
  pad_h | Height input data padding (output)
  pad_w | Width input data padding (output)
  stride_h | Stride for the height of input data (output)
  stride_w | Stride for the width of input data (output)
  dilation_h | Dilation height (output)
  dilation_w | Dilation width (output)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionFindMode()

miopenStatus_t miopenGetConvolutionFindMode | ( | const miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvolutionFindMode_t * | findMode )

Reads the Find Mode attribute from the convolution descriptor.

Parameters

  convDesc | Convolution layer descriptor (input)
  findMode | Find Mode of convDesc (output)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionForwardOutputDim()

miopenStatus_t miopenGetConvolutionForwardOutputDim | ( | miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | inputTensorDesc,
|  | const miopenTensorDescriptor_t | filterDesc,
|  | int * | n,
|  | int * | c,
|  | int * | h,
|  | int * | w )

Get the shape of a resulting 4-D tensor from a 2-D convolution.

This function returns the dimensions of the resulting 4D tensor of a 2D convolution, given the convolution descriptor, the input tensor descriptor and the filter descriptor. This function can help to setup the output tensor and allocate the proper amount of memory prior to launch the actual convolution.

Parameters

  convDesc | Convolution layer descriptor (input)
  inputTensorDesc | Input data tensor descriptor (input)
  filterDesc | Weight descriptor (input)
  n | Mini-batch size (output)
  c | Number of channels (output)
  h | Data height dimension size (output)
  w | Data width dimension size (output)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionGroupCount()

miopenStatus_t miopenGetConvolutionGroupCount | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int * | groupCount )

Get the number of groups to be used in Group/Depthwise convolution.

Parameters

  convDesc | Convolution layer descriptor (input)
  groupCount | Pointer to number of groups in group/depthwise convolution (output)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionNdDescriptor()

miopenStatus_t miopenGetConvolutionNdDescriptor | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int | requestedSpatialDim,
|  | int * | spatialDim,
|  | int * | padA,
|  | int * | strideA,
|  | int * | dilationA,
|  | miopenConvolutionMode_t * | c_mode )

Retrieves a N-dimensional convolution layer descriptor's details.

Parameters

  convDesc | Convolution layer descriptor (input)
  requestedSpatialDim | Expected convolution spatial dimension (intput)
  spatialDim | Convolutional spatial dimension (output)
  padA | Array of input data padding (output)
  strideA | Array of convolution stride (output)
  dilationA | Array of convolution dilation (output)
  c_mode | Convolutional mode (output)

Returns
  miopenStatus_t

## ◆ miopenGetConvolutionNdForwardOutputDim()

miopenStatus_t miopenGetConvolutionNdForwardOutputDim | ( | miopenConvolutionDescriptor_t | convDesc,
|  | const miopenTensorDescriptor_t | inputTensorDesc,
|  | const miopenTensorDescriptor_t | filterDesc,
|  | int * | nDim,
|  | int * | outputTensorDimA )

Get the shape of a resulting N-dimensional tensor from a (N-2)-dimensional convolution.

This function returns the dimensions of the resulting N-dimensional tensor of a (N-2)-dimensional convolution, given the convolution descriptor, the input tensor descriptor and the filter descriptor. It is used to setup the output tensor descriptor prior to executing the convolution layer.

Parameters

  convDesc | Convolution layer descriptor (input)
  inputTensorDesc | Input data tensor descriptor (input)
  filterDesc | Weight descriptor (input)
  nDim | Pointer to Output data tensor dimension (output)
  outputTensorDimA | Array of Output data tensor length (output)

## ◆ miopenGetConvolutionSpatialDim()

miopenStatus_t miopenGetConvolutionSpatialDim | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int * | spatialDim )

Retrieves the spatial dimension of a convolution layer descriptor.

Parameters

  convDesc | Convolution layer descriptor (input)
  spatialDim | Spatial dimension of convolution descriptor (output)

Returns
  miopenStatus_t

## ◆ miopenInitConvolutionDescriptor()

miopenStatus_t miopenInitConvolutionDescriptor | ( | miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvolutionMode_t | c_mode,
|  | int | pad_h,
|  | int | pad_w,
|  | int | stride_h,
|  | int | stride_w,
|  | int | dilation_h,
|  | int | dilation_w )

Creates a 2-D convolution layer descriptor.

For group/depthwise convolution dilation height and width, only a dilation value of 1 is supported.

Parameters

  convDesc | Convolution layer descriptor (output)
  c_mode | Convolutional mode (input)
  pad_h | Height input data padding (input)
  pad_w | Width input data padding (input)
  stride_h | Stride for the height of input data (input)
  stride_w | Stride for the width of input data (input)
  dilation_h | Dilation height (input)
  dilation_w | Dilation width (input)

Returns
  miopenStatus_t

## ◆ miopenInitConvolutionNdDescriptor()

miopenStatus_t miopenInitConvolutionNdDescriptor | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int | spatialDim,
|  | const int * | padA,
|  | const int * | strideA,
|  | const int * | dilationA,
|  | miopenConvolutionMode_t | c_mode )

Creates a N-dimensional convolution layer descriptor.

Parameters

  convDesc | Convolution layer descriptor (output)
  spatialDim | Convolutional spatial dimension (input)
  padA | Array of input data padding (input)
  strideA | Array of convolution stride (input)
  dilationA | Array of convolution dilation (input)
  c_mode | Convolutional mode (input)

Returns
  miopenStatus_t

## ◆ miopenSetConvolutionAttribute()

miopenStatus_t miopenSetConvolutionAttribute | ( | miopenConvolutionDescriptor_t | convDesc,
|  | const miopenConvolutionAttrib_t | attr,
|  | int | value )

Set the attribute of the convolution descriptor.

Parameters

  convDesc | Convolution layer descriptor (input)
  attr | Attribute of this convolution to set (input)
  value | Value of this attribute (input)

## ◆ miopenSetConvolutionFindMode()

miopenStatus_t miopenSetConvolutionFindMode | ( | miopenConvolutionDescriptor_t | convDesc,
|  | miopenConvolutionFindMode_t | findMode )

Sets the Find Mode attribute in the convolution descriptor.

The subsequent calls of miopenFindConvolutionForwardAlgorithm(), miopenFindConvolutionBackwardDataAlgorithm(), or miopenFindConvolutionBackwardWeightsAlgorithm() invoked with convDesc, will follow the findMode set by this call.

Note that the default Find Mode is overriden by the MIOPEN_FIND_MODE environment variable, if it is set. If unset, the default is as specified by miopenConvolutionFindModeDefault.

Parameters

  convDesc | Convolution layer descriptor (input)
  findMode | Find Mode of convDesc (input)

Returns
  miopenStatus_t

## ◆ miopenSetConvolutionGroupCount()

miopenStatus_t miopenSetConvolutionGroupCount | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int | groupCount )

Set the number of groups to be used in Group/Depthwise convolution.

Must be called before all computational APIs of group/depthwise convolution, it is preferable to call miopenInitConvolutionDescriptor() first, then miopenSetConvolutionGroupCount() to fully initialize group convolutions. Both Convolution Mode and Transpose Convolution Mode support group/depthwise convolution. To run depthwise convolution, set groupCount value equal to number of channels.

Parameters

  convDesc | Convolution layer descriptor (output)
  groupCount | number of groups, in depthwise conv using filter_number/channel_multiplier (input)

Returns
  miopenStatus_t

## ◆ miopenSetTransposeConvNdOutputPadding()

miopenStatus_t miopenSetTransposeConvNdOutputPadding | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int | spatialDim,
|  | const int * | adjA )

Set the output padding to be used in N-dimensional Transpose convolution.

This function is optional for initialization of Transpose convolution. If applicable, it must be called before all computational APIs of Transpose convolution. It is preferable to call miopenInitConvolutionNdDescriptor() first, then miopenSetTransposeConvNdOutputPadding() to fully initialize transpose convolutions. Currently, 2-D and 3-D convolutions are supported.

Parameters

  convDesc | Convolution layer descriptor (output)
  spatialDim | Convolutional spatial dimension (input)
  adjA | array of output padding for output data (input)

Returns
  miopenStatus_t

## ◆ miopenSetTransposeConvOutputPadding()

miopenStatus_t miopenSetTransposeConvOutputPadding | ( | miopenConvolutionDescriptor_t | convDesc,
|  | int | adj_h,
|  | int | adj_w )

Set the output padding to be used in 2-D Transpose convolution.

This function is optional for initialization of Transpose convolution. If applicable, it must be called before all computational APIs of Transpose convolution. It is preferable to call miopenInitConvolutionDescriptor() first, then miopenSetTransposeConvOutputPadding() to fully initialize transpose convolutions.

Parameters

  convDesc | Convolution layer descriptor (output)
  adj_h | output padding for the height of output data (input)
  adj_w | output padding for the width of output data (input)

Returns
  miopenStatus_t