Skip to main content
`Ctrl`+`K`

# Find2

MIOpen: Find2
Classes | Enumerations | Functions
Find2

## Classes

struct | miopenTensorArgument_t
| Values of a tensor or scalar argument for the miopenRunSolution function. More...

## Enumerations

enum | miopenProblemDirection_t { miopenProblemDirectionForward = 0 , miopenProblemDirectionBackward = 1 , miopenProblemDirectionBackwardWeights = 2 , miopenProblemDirectionInference = 4 }

enum

miopenTensorArgumentId_t {
miopenTensorArgumentIdInvalid = 0 ,
miopenTensorConvolutionX = 1 ,
miopenTensorConvolutionW = 2 ,
miopenTensorConvolutionY = 3 ,
miopenTensorMhaK = 4 ,
miopenTensorMhaQ = 5 ,
miopenTensorMhaV = 6 ,
miopenTensorMhaDescaleK = 7 ,
miopenTensorMhaDescaleQ = 8 ,
miopenTensorMhaDescaleV = 9 ,
miopenTensorMhaDescaleS = 10 ,
miopenTensorMhaScaleS = 11 ,
miopenTensorMhaScaleO = 12 ,
miopenTensorMhaDropoutProbability = 13 ,
miopenTensorMhaDropoutSeed = 14 ,
miopenTensorMhaDropoutOffset = 15 ,
miopenTensorMhaO = 16 ,
miopenTensorMhaAmaxO = 17 ,
miopenTensorMhaAmaxS = 18 ,
miopenTensorMhaM = 19 ,
miopenTensorMhaZInv = 20 ,
miopenTensorMhaDO = 21 ,
miopenTensorMhaDescaleO = 22 ,
miopenTensorMhaDescaleDO = 23 ,
miopenTensorMhaDescaleDS = 24 ,
miopenTensorMhaScaleDS = 25 ,
miopenTensorMhaScaleDQ = 26 ,
miopenTensorMhaScaleDK = 27 ,
miopenTensorMhaScaleDV = 28 ,
miopenTensorMhaDQ = 29 ,
miopenTensorMhaDK = 30 ,
miopenTensorMhaDV = 31 ,
miopenTensorMhaAmaxDQ = 32 ,
miopenTensorMhaAmaxDK = 33 ,
miopenTensorMhaAmaxDV = 34 ,
miopenTensorMhaAmaxDS = 35 ,
miopenTensorMhaBias = 36 ,
miopenTensorActivationX = 37 ,
miopenTensorActivationY = 38 ,
miopenTensorActivationDX = 39 ,
miopenTensorActivationDY = 40 ,
miopenTensorBiasX = 41 ,
miopenTensorBiasY = 42 ,
miopenTensorBias = 43 ,
miopenTensorSoftmaxX = 44 ,
miopenTensorSoftmaxY = 45 ,
miopenTensorSoftmaxDX = 46 ,
miopenTensorSoftmaxDY = 47 ,
miopenTensorBatchnormX = 48 ,
miopenTensorBatchnormY = 49 ,
miopenTensorBatchnormRunningMean = 50 ,
miopenTensorBatchnormRunningVariance = 51 ,
miopenTensorBatchnormSavedMean = 52 ,
miopenTensorBatchnormSavedVariance = 53 ,
miopenTensorBatchnormScale = 54 ,
miopenTensorBatchnormScaleDiff = 55 ,
miopenTensorBatchnormEstimatedMean = 56 ,
miopenTensorBatchnormEstimatedVariance = 57 ,
miopenTensorBatchnormBias = 58 ,
miopenTensorBatchnormBiasDiff = 59 ,
miopenTensorBatchnormDX = 60 ,
miopenTensorBatchnormDY = 61 ,
miopenTensorArgumentIsScalar = 1U << 31 ,
miopenTensorMhaMask = miopenTensorArgumentIsScalar | 1 ,
miopenScalarBatchnormExpAvgFactor = miopenTensorArgumentIsScalar | 2 ,
miopenScalarBatchnormEpsilon = miopenTensorArgumentIsScalar | 3
}

enum | miopenFindResultsOrder_t { miopenFindResultsOrderByTime = 0 , miopenFindResultsOrderByWorkspaceSize = 1 }
enum | miopenMhaMask_t { miopenMhaMaskNone = 0 , miopenMhaMaskCausal = 1 }
| Initializes a problem object describing a Mha operation. More...

## Functions

| MIOPEN_DECLARE_OBJECT (miopenProblem)
| Describes a problem for different miopen operations.
miopenStatus_t | miopenCreateConvProblem (miopenProblem_t *problem, miopenConvolutionDescriptor_t operatorDesc, miopenProblemDirection_t direction)
| Initializes a problem object describing a convolution operation.
miopenStatus_t | miopenCreateMhaProblem (miopenProblem_t *problem, miopenMhaDescriptor_t operatorDesc, miopenProblemDirection_t direction)
miopenStatus_t | miopenCreateMhaDescriptor (miopenMhaDescriptor_t *mhaDesc)
| Creates the mha descriptor object.
miopenStatus_t | miopenSetMhaDescriptor (miopenMhaDescriptor_t mhaDesc, float scale)
| Sets the Mha descriptor details.
miopenStatus_t | miopenGetMhaDescriptor (miopenMhaDescriptor_t mhaDesc, float *scale)
| Gets the Mha descriptor details.
miopenStatus_t | miopenCreateSoftmaxDescriptor (miopenSoftmaxDescriptor_t *softmaxDesc)
| Creates the Softmax descriptor object.
miopenStatus_t | miopenSetSoftmaxDescriptor (miopenSoftmaxDescriptor_t softmaxDesc, float alpha, float beta, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
| Sets the softmax descriptor details.
miopenStatus_t | miopenGetSoftmaxDescriptor (const miopenSoftmaxDescriptor_t softmaxDesc, float *alpha, float *beta, miopenSoftmaxAlgorithm_t *algorithm, miopenSoftmaxMode_t *mode)
| Gets the softmax layer descriptor details.
miopenStatus_t | miopenDestroyProblem (miopenProblem_t problem)
| Destroys a problem object.
miopenStatus_t | miopenSetProblemTensorDescriptor (miopenProblem_t problem, miopenTensorArgumentId_t id, const miopenTensorDescriptor_t descriptor)
| Sets a tensor descriptor for the specified argument.
| MIOPEN_DECLARE_OBJECT (miopenFindOptions)
| The miopenFindOptions allows the user to configure how find will be used.
miopenStatus_t | miopenCreateFindOptions (miopenFindOptions_t *options)
| Initializes miopenFindOptions object.
miopenStatus_t | miopenDestroyFindOptions (miopenFindOptions_t options)
| Destroys miopenFindOptions object.
miopenStatus_t | miopenSetFindOptionTuning (miopenFindOptions_t options, int value)
| Sets the tuning find option. Default value is zero.
miopenStatus_t | miopenSetFindOptionResultsOrder (miopenFindOptions_t options, miopenFindResultsOrder_t value)
| Sets the results order find option. Default value is miopenFindResultsOrderByTime.
miopenStatus_t | miopenSetFindOptionWorkspaceLimit (miopenFindOptions_t options, size_t value)
| Sets the workspace limit find option. Default value is maximum of size_t.
miopenStatus_t | miopenSetFindOptionPreallocatedWorkspace (miopenFindOptions_t options, void *buffer, size_t size)
| Attaches the preallocated workspace to find options. Allocated by the library by default.
miopenStatus_t | miopenSetFindOptionPreallocatedTensor (miopenFindOptions_t options, miopenTensorArgumentId_t id, void *buffer)
| Attaches a preallocated tensor to find options. If not used, buffers are allocated by MIOpen internally, which is not recommended.
miopenStatus_t | miopenSetFindOptionAttachBinaries (miopenFindOptions_t options, unsigned attach)
| Forces library to attach kernel binaries to solutions for later saving. This allows zero lookup miopenRunSolution calls after miopenLoadSolution. Default value is 0.
| MIOPEN_DECLARE_OBJECT (miopenSolution)
| The miopenSolution object describes a prepared solution.
miopenStatus_t | miopenFindSolutions (miopenHandle_t handle, miopenProblem_t problem, miopenFindOptions_t options, miopenSolution_t *solutions, size_t *numSolutions, size_t maxSolutions)
| Finds solutions to a problem by running different applicable solutions. Memory is automatically allocated.
miopenStatus_t | miopenRunSolution (miopenHandle_t handle, miopenSolution_t solution, size_t nInputs, const miopenTensorArgument_t *tensors, void *workspace, size_t workspaceSize)
| Runs the solution using the passed in buffers.
miopenStatus_t | miopenDestroySolution (miopenSolution_t solution)
| Destroys solution object.
miopenStatus_t | miopenLoadSolution (miopenSolution_t *solution, const char *data, size_t size)
| Loads solution object from binary data.
miopenStatus_t | miopenSaveSolution (miopenSolution_t solution, char *data)
| Saves a solution object as binary data.
miopenStatus_t | miopenGetSolutionSize (miopenSolution_t solution, size_t *size)
| Reads the expected size of a solution.
miopenStatus_t | miopenGetSolutionWorkspaceSize (miopenSolution_t solution, size_t *workspaceSize)
| Reads the amount of workspace required to exectute the solution.
miopenStatus_t | miopenGetSolutionTime (miopenSolution_t solution, float *time)
| Reads the time spent to execute the solution the last it was run.
miopenStatus_t | miopenGetSolutionSolverId (miopenSolution_t solution, uint64_t *solverId)
| Reads id of the solver referred by the solution.
miopenStatus_t | miopenGetSolverIdConvAlgorithm (uint64_t solverId, miopenConvAlgorithm_t *result)
| Gets the convolution algorithm implemented by a solver.
miopenStatus_t | miopenCreateActivationProblem (miopenProblem_t *problem, miopenActivationDescriptor_t operatorDesc, miopenProblemDirection_t direction)
| Initializes a problem object describing an activation operation.
miopenStatus_t | miopenCreateBatchnormProblem (miopenProblem_t *problem, miopenBatchNormMode_t mode, bool runningMeanVariance, miopenProblemDirection_t direction)
| Initializes a problem object describing an activation operation.
miopenStatus_t | miopenFuseProblems (miopenProblem_t problem1, miopenProblem_t problem2)
| Fuse two problems into a single one. Problems can be either regular, or fused. No problems are disposed in the process, so the problem2 should be destroyed manually if it is not needed anymore.
miopenStatus_t | miopenCreateBiasProblem (miopenProblem_t *problem, miopenProblemDirection_t direction)
| Initializes a problem object describing an bias operation.
miopenStatus_t | miopenCreateSoftmaxProblem (miopenProblem_t *problem, miopenSoftmaxDescriptor_t operatorDesc, miopenProblemDirection_t direction)
| Initializes a problem object describing a softmax operation.

## Detailed Description

## Enumeration Type Documentation

## ◆ miopenFindResultsOrder_t

enum miopenFindResultsOrder_t

Enumerator
miopenFindResultsOrderByTime |
miopenFindResultsOrderByWorkspaceSize |

## ◆ miopenMhaMask_t

enum miopenMhaMask_t

Initializes a problem object describing a Mha operation.

Parameters

  problem | Pointer to the problem to initialize
  operatorDesc | Descriptor of the operator to be used
  direction | Direction of the operation

Returns
  miopenStatus_t

Different masks for Mha.

Enumerator
miopenMhaMaskNone |
miopenMhaMaskCausal |

## ◆ miopenProblemDirection_t

enum miopenProblemDirection_t

Directions of miopen operation.

Enumerator
miopenProblemDirectionForward |
miopenProblemDirectionBackward |
miopenProblemDirectionBackwardWeights |
miopenProblemDirectionInference |

## ◆ miopenTensorArgumentId_t

enum miopenTensorArgumentId_t

Identifiers for tensor arguments of problems and operations.

Different ways to sort results of the find call.

Enumerator
miopenTensorArgumentIdInvalid |
miopenTensorConvolutionX |
miopenTensorConvolutionW |
miopenTensorConvolutionY |
miopenTensorMhaK |
miopenTensorMhaQ |
miopenTensorMhaV |
miopenTensorMhaDescaleK |
miopenTensorMhaDescaleQ |
miopenTensorMhaDescaleV |
miopenTensorMhaDescaleS |
miopenTensorMhaScaleS |
miopenTensorMhaScaleO |
miopenTensorMhaDropoutProbability |
miopenTensorMhaDropoutSeed |
miopenTensorMhaDropoutOffset |
miopenTensorMhaO |
miopenTensorMhaAmaxO |
miopenTensorMhaAmaxS |
miopenTensorMhaM |
miopenTensorMhaZInv |
miopenTensorMhaDO |
miopenTensorMhaDescaleO |
miopenTensorMhaDescaleDO |
miopenTensorMhaDescaleDS |
miopenTensorMhaScaleDS |
miopenTensorMhaScaleDQ |
miopenTensorMhaScaleDK |
miopenTensorMhaScaleDV |
miopenTensorMhaDQ |
miopenTensorMhaDK |
miopenTensorMhaDV |
miopenTensorMhaAmaxDQ |
miopenTensorMhaAmaxDK |
miopenTensorMhaAmaxDV |
miopenTensorMhaAmaxDS |
miopenTensorMhaBias |
miopenTensorActivationX |
miopenTensorActivationY |
miopenTensorActivationDX |
miopenTensorActivationDY |
miopenTensorBiasX |
miopenTensorBiasY |
miopenTensorBias |
miopenTensorSoftmaxX |
miopenTensorSoftmaxY |
miopenTensorSoftmaxDX |
miopenTensorSoftmaxDY |
miopenTensorBatchnormX |
miopenTensorBatchnormY |
miopenTensorBatchnormRunningMean |
miopenTensorBatchnormRunningVariance |
miopenTensorBatchnormSavedMean |
miopenTensorBatchnormSavedVariance |
miopenTensorBatchnormScale |
miopenTensorBatchnormScaleDiff |
miopenTensorBatchnormEstimatedMean |
miopenTensorBatchnormEstimatedVariance |
miopenTensorBatchnormBias |
miopenTensorBatchnormBiasDiff |
miopenTensorBatchnormDX |
miopenTensorBatchnormDY |
miopenTensorArgumentIsScalar |
miopenTensorMhaMask |
miopenScalarBatchnormExpAvgFactor |
miopenScalarBatchnormEpsilon |

## Function Documentation

## ◆ MIOPEN_DECLARE_OBJECT() [1/3]

MIOPEN_DECLARE_OBJECT | ( | miopenFindOptions |  | ) |

The miopenFindOptions allows the user to configure how find will be used.

## ◆ MIOPEN_DECLARE_OBJECT() [2/3]

MIOPEN_DECLARE_OBJECT | ( | miopenProblem |  | ) |

Describes a problem for different miopen operations.

For now, this is only used for convolution, but could be used for other operators in the future(such as GEMM, Pooling, etc)

## ◆ MIOPEN_DECLARE_OBJECT() [3/3]

MIOPEN_DECLARE_OBJECT | ( | miopenSolution |  | ) |

The miopenSolution object describes a prepared solution.

## ◆ miopenCreateActivationProblem()

miopenStatus_t miopenCreateActivationProblem | ( | miopenProblem_t * | problem,
|  | miopenActivationDescriptor_t | operatorDesc,
|  | miopenProblemDirection_t | direction )

Initializes a problem object describing an activation operation.

Note
  As of now there is no way to actually get any solution for this kind of problems.

Parameters

  problem | Pointer to the problem to initialize
  operatorDesc | Descriptor of the operator to be used
  direction | Direction of the operation

Returns
  miopenStatus_t

## ◆ miopenCreateBatchnormProblem()

miopenStatus_t miopenCreateBatchnormProblem | ( | miopenProblem_t * | problem,
|  | miopenBatchNormMode_t | mode,
|  | bool | runningMeanVariance,
|  | miopenProblemDirection_t | direction )

Initializes a problem object describing an activation operation.

Note
  As of now there is no way to actually get any solution for this kind of problems.

Parameters

  problem | Pointer to the problem to initialize
  mode | Batchnorm mode
  direction | Direction of the operation

Returns
  miopenStatus_t

## ◆ miopenCreateBiasProblem()

miopenStatus_t miopenCreateBiasProblem | ( | miopenProblem_t * | problem,
|  | miopenProblemDirection_t | direction )

Initializes a problem object describing an bias operation.

Note
  As of now there is no way to actually get any solution for this kind of problems.

Parameters

  problem | Pointer to the problem to initialize
  direction | Direction of the operation

Returns
  miopenStatus_t

## ◆ miopenCreateConvProblem()

miopenStatus_t miopenCreateConvProblem | ( | miopenProblem_t * | problem,
|  | miopenConvolutionDescriptor_t | operatorDesc,
|  | miopenProblemDirection_t | direction )

Initializes a problem object describing a convolution operation.

Parameters

  problem | Pointer to the problem to initialize
  operatorDesc | Descriptor of the operator to be used
  direction | Direction of the operation

Returns
  miopenStatus_t

## ◆ miopenCreateFindOptions()

miopenStatus_t miopenCreateFindOptions | ( | miopenFindOptions_t * | options | ) |

Initializes miopenFindOptions object.

Parameters

  options | Pointer to options object to initialze

Returns
  miopenStatus_t

## ◆ miopenCreateMhaDescriptor()

miopenStatus_t miopenCreateMhaDescriptor | ( | miopenMhaDescriptor_t * | mhaDesc | ) |

Creates the mha descriptor object.

Parameters

  mhaDesc | Pointer to a mha descriptor type

Returns
  miopenStatus_t

## ◆ miopenCreateMhaProblem()

miopenStatus_t miopenCreateMhaProblem | ( | miopenProblem_t * | problem,
|  | miopenMhaDescriptor_t | operatorDesc,
|  | miopenProblemDirection_t | direction )

## ◆ miopenCreateSoftmaxDescriptor()

miopenStatus_t miopenCreateSoftmaxDescriptor | ( | miopenSoftmaxDescriptor_t * | softmaxDesc | ) |

Creates the Softmax descriptor object.

Parameters

  softmaxDesc | Pointer to an softmax descriptor type

Returns
  miopenStatus_t

## ◆ miopenCreateSoftmaxProblem()

miopenStatus_t miopenCreateSoftmaxProblem | ( | miopenProblem_t * | problem,
|  | miopenSoftmaxDescriptor_t | operatorDesc,
|  | miopenProblemDirection_t | direction )

Initializes a problem object describing a softmax operation.

Parameters

  problem | Pointer to the problem to initialize
  operatorDesc | Descriptor of the operator to be used
  direction | Direction of the operation

Returns
  miopenStatus_t

## ◆ miopenDestroyFindOptions()

miopenStatus_t miopenDestroyFindOptions | ( | miopenFindOptions_t | options | ) |

Destroys miopenFindOptions object.

Parameters

  options | Options object to destroy

Returns
  miopenStatus_t

## ◆ miopenDestroyProblem()

miopenStatus_t miopenDestroyProblem | ( | miopenProblem_t | problem | ) |

Destroys a problem object.

Parameters

  problem | Problem to destroy

Returns
  miopenStatus_t

## ◆ miopenDestroySolution()

miopenStatus_t miopenDestroySolution | ( | miopenSolution_t | solution | ) |

Destroys solution object.

Parameters

  solution | Solution to destroy

Returns
  miopenStatus_t

## ◆ miopenFindSolutions()

miopenStatus_t miopenFindSolutions | ( | miopenHandle_t | handle,
|  | miopenProblem_t | problem,
|  | miopenFindOptions_t | options,
|  | miopenSolution_t * | solutions,
|  | size_t * | numSolutions,
|  | size_t | maxSolutions )

Finds solutions to a problem by running different applicable solutions. Memory is automatically allocated.

Parameters

  handle | Handle to execute the kernels
  problem | Problem to solve
  options | Find options. When null default values would be used
  solutions | Pointer to the first result. Must not be null
  numSolutions | Pointer to the amount of results. Ignored if null
  maxSolutions | Limits the amount of results

Returns
  miopenStatus_t

## ◆ miopenFuseProblems()

miopenStatus_t miopenFuseProblems | ( | miopenProblem_t | problem1,
|  | miopenProblem_t | problem2 )

Fuse two problems into a single one. Problems can be either regular, or fused. No problems are disposed in the process, so the problem2 should be destroyed manually if it is not needed anymore.

miopenProblem_t problem = makeSomeProblem1();
miopenProblem_t problem2 = makeSomeProblem2();
miopenProblem_t problem3 = makeSomeProblem3();
miopenFuseProblems(problem, problem2);
// Now problem contains {problem1, problem2}
miopenFuseProblems(problem, problem3);
// Now problem contains {problem1, problem2, problem3}
miopenDestroyProblem(problem2);
miopenDestroyProblem(problem3);

Note
  As of now there is no way to actually get any solution for this kind of problem.

Parameters

  problem1 | The first problem to fuse. The result would be stored here.
  problem2 | The second problem to fuse.

Returns
  miopenStatus_t

## ◆ miopenGetMhaDescriptor()

miopenStatus_t miopenGetMhaDescriptor | ( | miopenMhaDescriptor_t | mhaDesc,
|  | float * | scale )

Gets the Mha descriptor details.

Retrieves all of the descriptor details for the Mha.

Parameters

  mhaDesc | Pointer to a Mha descriptor
  scale | Scale (output)

Returns
  miopenStatus_t

## ◆ miopenGetSoftmaxDescriptor()

miopenStatus_t miopenGetSoftmaxDescriptor | ( | const miopenSoftmaxDescriptor_t | softmaxDesc,
|  | float * | alpha,
|  | float * | beta,
|  | miopenSoftmaxAlgorithm_t * | algorithm,
|  | miopenSoftmaxMode_t * | mode )

Gets the softmax layer descriptor details.

Retrieves all of the descriptor details for the softmax layer.

Parameters

  softmaxDesc | Pointer to a softmax layer descriptor (input)
  alpha | Softmax alpha parameter (output)
  beta | Softmax beta parameter (output)
  algorithm | Softmax algorithm (output)
  mode | Softmax mode (output)

Returns
  miopenStatus_t

## ◆ miopenGetSolutionSize()

miopenStatus_t miopenGetSolutionSize | ( | miopenSolution_t | solution,
|  | size_t * | size )

Reads the expected size of a solution.

Parameters

  solution | Solution to get size
  size | Pointer to a location where to write the size of the solution blob

Returns
  miopenStatus_t

## ◆ miopenGetSolutionSolverId()

miopenStatus_t miopenGetSolutionSolverId | ( | miopenSolution_t | solution,
|  | uint64_t * | solverId )

Reads id of the solver referred by the solution.

Parameters

  solution | Solution to get solver id from
  solverId | Pointer to a location where to write the solver id

Returns
  miopenStatus_t

## ◆ miopenGetSolutionTime()

miopenStatus_t miopenGetSolutionTime | ( | miopenSolution_t | solution,
|  | float * | time )

Reads the time spent to execute the solution the last it was run.

Parameters

  solution | Solution to get exection time
  time | Pointer to a location where to write the execution time

Returns
  miopenStatus_t

## ◆ miopenGetSolutionWorkspaceSize()

miopenStatus_t miopenGetSolutionWorkspaceSize | ( | miopenSolution_t | solution,
|  | size_t * | workspaceSize )

Reads the amount of workspace required to exectute the solution.

Parameters

  solution | Solution to get required workspace size
  workspaceSize | Pointer to a location where to write the workspace size

Returns
  miopenStatus_t

## ◆ miopenGetSolverIdConvAlgorithm()

miopenStatus_t miopenGetSolverIdConvAlgorithm | ( | uint64_t | solverId,
|  | miopenConvAlgorithm_t * | result )

Gets the convolution algorithm implemented by a solver.

Parameters

  solverId | Solver id to get convolution algorithm of
  result | Pointer to a location where to write the algorithm

Returns
  miopenStatus_t

## ◆ miopenLoadSolution()

miopenStatus_t miopenLoadSolution | ( | miopenSolution_t * | solution,
|  | const char * | data,
|  | size_t | size )

Loads solution object from binary data.

Parameters

  solution | Pointer to the solution to load
  data | Data to load the solution from
  size | Size of the solution blob

Returns
  miopenStatus_t

## ◆ miopenRunSolution()

miopenStatus_t miopenRunSolution | ( | miopenHandle_t | handle,
|  | miopenSolution_t | solution,
|  | size_t | nInputs,
|  | const miopenTensorArgument_t * | tensors,
|  | void * | workspace,
|  | size_t | workspaceSize )

Runs the solution using the passed in buffers.

Parameters

  handle | Handle to execute the kernels
  solution | Solution to execute
  nInputs | Amount to inputs for the solution
  tensors | Tensor arguments described by miopenTensorArgument_t
  workspace | Pointer to device buffer used as workspace. May be null when not required. Should not be less than expected
  workspaceSize | Size of the workspace buffer

Returns
  miopenStatus_t

## ◆ miopenSaveSolution()

miopenStatus_t miopenSaveSolution | ( | miopenSolution_t | solution,
|  | char * | data )

Saves a solution object as binary data.

Parameters

  solution | Solution to save
  data | Pointer to a buffer to save soltuion to

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionAttachBinaries()

miopenStatus_t miopenSetFindOptionAttachBinaries | ( | miopenFindOptions_t | options,
|  | unsigned | attach )

Forces library to attach kernel binaries to solutions for later saving. This allows zero lookup miopenRunSolution calls after miopenLoadSolution. Default value is 0.

Parameters

  options | Options object to update
  attach | 1 means attaching, 0 - skipping, any other value - reserved for future use

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionPreallocatedTensor()

miopenStatus_t miopenSetFindOptionPreallocatedTensor | ( | miopenFindOptions_t | options,
|  | miopenTensorArgumentId_t | id,
|  | void * | buffer )

Attaches a preallocated tensor to find options. If not used, buffers are allocated by MIOpen internally, which is not recommended.

Parameters

  options | Options object to update
  id | Specifies the id of the tensor passed
  buffer | Specifies the tensor for find call

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionPreallocatedWorkspace()

miopenStatus_t miopenSetFindOptionPreallocatedWorkspace | ( | miopenFindOptions_t | options,
|  | void * | buffer,
|  | size_t | size )

Attaches the preallocated workspace to find options. Allocated by the library by default.

Parameters

  options | Options object to update
  buffer | Specifies the workspace for find call
  size | Specifies the size of the buffer passed

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionResultsOrder()

miopenStatus_t miopenSetFindOptionResultsOrder | ( | miopenFindOptions_t | options,
|  | miopenFindResultsOrder_t | value )

Sets the results order find option. Default value is miopenFindResultsOrderByTime.

Parameters

  options | Options object to update
  value | Specifies what order should find results have

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionTuning()

miopenStatus_t miopenSetFindOptionTuning | ( | miopenFindOptions_t | options,
|  | int | value )

Sets the tuning find option. Default value is zero.

Parameters

  options | Options object to update
  value | Value of zero means no tuning, value of one means tuning enabled

Returns
  miopenStatus_t

## ◆ miopenSetFindOptionWorkspaceLimit()

miopenStatus_t miopenSetFindOptionWorkspaceLimit | ( | miopenFindOptions_t | options,
|  | size_t | value )

Sets the workspace limit find option. Default value is maximum of size_t.

Parameters

  options | Options object to update
  value | Specifies the workspace limit for find call. All solvers exceeding the limit would be ignored.

Returns
  miopenStatus_t

## ◆ miopenSetMhaDescriptor()

miopenStatus_t miopenSetMhaDescriptor | ( | miopenMhaDescriptor_t | mhaDesc,
|  | float | scale )

Sets the Mha descriptor details.

Sets all of the descriptor details for the Mha

Parameters

  mhaDesc | Pointer to a Mha descriptor
  scale | Scale

Returns
  miopenStatus_t

## ◆ miopenSetProblemTensorDescriptor()

miopenStatus_t miopenSetProblemTensorDescriptor | ( | miopenProblem_t | problem,
|  | miopenTensorArgumentId_t | id,
|  | const miopenTensorDescriptor_t | descriptor )

Sets a tensor descriptor for the specified argument.

Parameters

  problem | Problem to update
  id | Id of the argument for the descriptor
  descriptor | Tensor descriptor to set

Returns
  miopenStatus_t

## ◆ miopenSetSoftmaxDescriptor()

miopenStatus_t miopenSetSoftmaxDescriptor | ( | miopenSoftmaxDescriptor_t | softmaxDesc,
|  | float | alpha,
|  | float | beta,
|  | miopenSoftmaxAlgorithm_t | algorithm,
|  | miopenSoftmaxMode_t | mode )

Sets the softmax descriptor details.

Sets all of the descriptor details for the softmax layer

Parameters

  softmaxDesc | Pointer to a softmax layer descriptor
  alpha | Softmax alpha parameter
  beta | Softmax beta parameter
  algorithm | Softmax algorithm
  mode | Softmax mode

Returns
  miopenStatus_t