Skip to content

MIOpen Convolutions

Mayank Daga edited this page Jul 19, 2017 · 1 revision

MIOpen currently supports 2D convolutions in the float (fp32) datatype.

The miopenFindConvolution*Algorithm() API is required to be called before calling the actual convolution API. miopenFindConvolution*Algorithm() API serves two purposes -

  1. Benchmarks and finds the optimal algorithm for the said input configurations.
  2. Compiles and caches the convolution kernels such that when the same problem is used, there is no overhead of compiling.

A typical API calling sequence for convolutions in MIOpen is:

  1. miopenConvolution*GetWorkSpaceSize()
    • returns the workspace size required by miopenFindConvolution*Algorithm().
    • if no workspace size is provided or if miopenConvolution*GetWorkSpaceSize() is not called then the Find() step will attempt to benchmark all the algorithms that do not require any workspace. If such an algorithm does not exist then an exception is thrown.
  2. miopenFindConvolution*Algorithm()
  3. miopenConvolution*()