Find2#
Classes | |
struct | miopenTensorArgument_t |
Values of a tensor or scalar argument for the miopenRunSolution function. More... | |
Functions | |
MIOPEN_DECLARE_OBJECT (miopenProblem) | |
Describes a problem for different miopen operations. More... | |
miopenStatus_t | miopenCreateConvProblem (miopenProblem_t *problem, miopenConvolutionDescriptor_t operatorDesc, miopenProblemDirection_t direction) |
Initializes a problem object describing a convolution operation. More... | |
miopenStatus_t | miopenCreateMhaProblem (miopenProblem_t *problem, miopenMhaDescriptor_t operatorDesc, miopenProblemDirection_t direction) |
Initializes a problem object describing a Mha operation. More... | |
miopenStatus_t | miopenCreateMhaDescriptor (miopenMhaDescriptor_t *mhaDesc) |
Creates the mha descriptor object. More... | |
miopenStatus_t | miopenSetMhaDescriptor (miopenMhaDescriptor_t mhaDesc, float scale) |
Sets the Mha descriptor details. More... | |
miopenStatus_t | miopenGetMhaDescriptor (miopenMhaDescriptor_t mhaDesc, float *scale) |
Gets the Mha descriptor details. More... | |
miopenStatus_t | miopenCreateSoftmaxDescriptor (miopenSoftmaxDescriptor_t *softmaxDesc) |
Creates the Softmax descriptor object. More... | |
miopenStatus_t | miopenSetSoftmaxDescriptor (miopenSoftmaxDescriptor_t softmaxDesc, float alpha, float beta, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode) |
Sets the softmax descriptor details. More... | |
miopenStatus_t | miopenGetSoftmaxDescriptor (const miopenSoftmaxDescriptor_t softmaxDesc, float *alpha, float *beta, miopenSoftmaxAlgorithm_t *algorithm, miopenSoftmaxMode_t *mode) |
Gets the softmax layer descriptor details. More... | |
miopenStatus_t | miopenDestroyProblem (miopenProblem_t problem) |
Destroys a problem object. More... | |
miopenStatus_t | miopenSetProblemTensorDescriptor (miopenProblem_t problem, miopenTensorArgumentId_t id, const miopenTensorDescriptor_t descriptor) |
Sets a tensor descriptor for the specified argument. More... | |
MIOPEN_DECLARE_OBJECT (miopenFindOptions) | |
The miopenFindOptions allows the user to configure how find will be used. More... | |
miopenStatus_t | miopenCreateFindOptions (miopenFindOptions_t *options) |
Initializes miopenFindOptions object. More... | |
miopenStatus_t | miopenDestroyFindOptions (miopenFindOptions_t options) |
Destroys miopenFindOptions object. More... | |
miopenStatus_t | miopenSetFindOptionTuning (miopenFindOptions_t options, int value) |
Sets the tuning find option. Default value is zero. More... | |
miopenStatus_t | miopenSetFindOptionResultsOrder (miopenFindOptions_t options, miopenFindResultsOrder_t value) |
Sets the results order find option. Default value is miopenFindResultsOrderByTime. More... | |
miopenStatus_t | miopenSetFindOptionWorkspaceLimit (miopenFindOptions_t options, size_t value) |
Sets the workspace limit find option. Default value is maximum of size_t. More... | |
miopenStatus_t | miopenSetFindOptionPreallocatedWorkspace (miopenFindOptions_t options, void *buffer, size_t size) |
Attaches the preallocated workspace to find options. Allocated by the library by default. More... | |
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. More... | |
MIOPEN_DECLARE_OBJECT (miopenSolution) | |
The miopenSolution object describes a prepared solution. More... | |
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. More... | |
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. More... | |
miopenStatus_t | miopenDestroySolution (miopenSolution_t solution) |
Destroys solution object. More... | |
miopenStatus_t | miopenLoadSolution (miopenSolution_t *solution, const char *data, size_t size) |
Loads solution object from binary data. More... | |
miopenStatus_t | miopenSaveSolution (miopenSolution_t solution, char *data) |
Saves a solution object as binary data. More... | |
miopenStatus_t | miopenGetSolutionSize (miopenSolution_t solution, size_t *size) |
Reads the expected size of a solution. More... | |
miopenStatus_t | miopenGetSolutionWorkspaceSize (miopenSolution_t solution, size_t *workspaceSize) |
Reads the amount of workspace required to exectute the solution. More... | |
miopenStatus_t | miopenGetSolutionTime (miopenSolution_t solution, float *time) |
Reads the time spent to execute the solution the last it was run. More... | |
miopenStatus_t | miopenGetSolutionSolverId (miopenSolution_t solution, uint64_t *solverId) |
Reads id of the solver referred by the solution. More... | |
miopenStatus_t | miopenGetSolverIdConvAlgorithm (uint64_t solverId, miopenConvAlgorithm_t *result) |
Gets the convolution algorithm implemented by a solver. More... | |
miopenStatus_t | miopenCreateActivationProblem (miopenProblem_t *problem, miopenActivationDescriptor_t operatorDesc, miopenProblemDirection_t direction) |
Initializes a problem object describing an activation operation. More... | |
miopenStatus_t | miopenCreateBatchnormProblem (miopenProblem_t *problem, miopenBatchNormMode_t mode, bool runningMeanVariance, miopenProblemDirection_t direction) |
Initializes a problem object describing an activation operation. More... | |
miopenStatus_t | miopenFuseProblems (miopenProblem_t problem1, miopenProblem_t problem2) |
miopenStatus_t | miopenCreateBiasProblem (miopenProblem_t *problem, miopenProblemDirection_t direction) |
Initializes a problem object describing an bias operation. More... | |
miopenStatus_t | miopenCreateSoftmaxProblem (miopenProblem_t *problem, miopenSoftmaxDescriptor_t operatorDesc, miopenProblemDirection_t direction) |
Initializes a problem object describing a softmax operation. More... | |
Detailed Description
Enumeration Type Documentation
◆ miopenFindResultsOrder_t
◆ miopenProblemDirection_t
◆ miopenTensorArgumentId_t
Identifiers for tensor arguments of problems and operations.
Different ways to sort results of the find call.
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 | ||
) |
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
◆ 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 | ||
) |
◆ 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
◆ 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