Find2

Find2#

MIOpen: Find2

Classes

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

Enumerations

enum  miopenProblemDirection_t {
  miopenProblemDirectionForward = 0 ,
  miopenProblemDirectionBackward = 1 ,
  miopenProblemDirectionBackwardWeights = 2
}
 
enum  miopenTensorArgumentId_t {
  miopenTensorArgumentIdInvalid = 0 ,
  miopenTensorConvolutionX = 1 ,
  miopenTensorConvolutionW = 2 ,
  miopenTensorConvolutionY = 3 ,
  miopenTensorActivationX = 4 ,
  miopenTensorActivationY = 5 ,
  miopenTensorActivationDX = 6 ,
  miopenTensorActivationDY = 7 ,
  miopenTensorBiasX = 8 ,
  miopenTensorBiasY = 9 ,
  miopenTensorBias = 10
}
 
enum  miopenFindResultsOrder_t {
  miopenFindResultsOrderByTime = 0 ,
  miopenFindResultsOrderByWorkspaceSize = 1
}
 

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 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 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...
 

Detailed Description

Enumeration Type Documentation

◆ miopenFindResultsOrder_t

Enumerator
miopenFindResultsOrderByTime 
miopenFindResultsOrderByWorkspaceSize 
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenProblemDirection_t

Directions of miopen operation.

Enumerator
miopenProblemDirectionForward 
miopenProblemDirectionBackward 
miopenProblemDirectionBackwardWeights 
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenTensorArgumentId_t

Identifiers for tensor arguments of problems and operations.

Different ways to sort results of the find call.

Enumerator
miopenTensorArgumentIdInvalid 
miopenTensorConvolutionX 
miopenTensorConvolutionW 
miopenTensorConvolutionY 
miopenTensorActivationX 
miopenTensorActivationY 
miopenTensorActivationDX 
miopenTensorActivationDY 
miopenTensorBiasX 
miopenTensorBiasY 
miopenTensorBias 
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

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
problemPointer to the problem to initialize
operatorDescDescriptor of the operator to be used
directionDirection of the operation
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ 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
problemPointer to the problem to initialize
directionDirection of the operation
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenCreateConvProblem()

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

Initializes a problem object describing a convolution operation.

Parameters
problemPointer to the problem to initialize
operatorDescDescriptor of the operator to be used
directionDirection of the operation
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenCreateFindOptions()

miopenStatus_t miopenCreateFindOptions ( miopenFindOptions_t *  options)

Initializes miopenFindOptions object.

Parameters
optionsPointer to options object to initialze
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenDestroyFindOptions()

miopenStatus_t miopenDestroyFindOptions ( miopenFindOptions_t  options)

Destroys miopenFindOptions object.

Parameters
optionsOptions object to destroy
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenDestroyProblem()

miopenStatus_t miopenDestroyProblem ( miopenProblem_t  problem)

Destroys a problem object.

Parameters
problemProblem to destroy
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenDestroySolution()

miopenStatus_t miopenDestroySolution ( miopenSolution_t  solution)

Destroys solution object.

Parameters
solutionSolution to destroy
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ 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
handleHandle to execute the kernels
problemProblem to solve
optionsFind options. When null default values would be used
solutionsPointer to the first result. Must not be null
numSolutionsPointer to the amount of results. Ignored if null
maxSolutionsLimits the amount of results
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenFuseProblems()

miopenStatus_t miopenFuseProblems ( miopenProblem_t  problem1,
miopenProblem_t  problem2 
)

◆ miopenGetSolutionSize()

miopenStatus_t miopenGetSolutionSize ( miopenSolution_t  solution,
size_t *  size 
)

Reads the expected size of a solution.

Parameters
solutionSolution to get size
sizePointer to a location where to write the size of the solution blob
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenGetSolutionSolverId()

miopenStatus_t miopenGetSolutionSolverId ( miopenSolution_t  solution,
uint64_t *  solverId 
)

Reads id of the solver referred by the solution.

Parameters
solutionSolution to get solver id from
solverIdPointer to a location where to write the solver id
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenGetSolutionTime()

miopenStatus_t miopenGetSolutionTime ( miopenSolution_t  solution,
float *  time 
)

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

Parameters
solutionSolution to get exection time
timePointer to a location where to write the execution time
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenGetSolutionWorkspaceSize()

miopenStatus_t miopenGetSolutionWorkspaceSize ( miopenSolution_t  solution,
size_t *  workspaceSize 
)

Reads the amount of workspace required to exectute the solution.

Parameters
solutionSolution to get required workspace size
workspaceSizePointer to a location where to write the workspace size
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenGetSolverIdConvAlgorithm()

miopenStatus_t miopenGetSolverIdConvAlgorithm ( uint64_t  solverId,
miopenConvAlgorithm_t result 
)

Gets the convolution algorithm implemented by a solver.

Parameters
solverIdSolver id to get convolution algorithm of
resultPointer to a location where to write the algorithm
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenLoadSolution()

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

Loads solution object from binary data.

Parameters
solutionPointer to the solution to load
dataData to load the solution from
sizeSize of the solution blob
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ 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
handleHandle to execute the kernels
solutionSolution to execute
nInputsAmount to inputs for the solution
tensorsTensor arguments described by miopenTensorArgument_t
workspacePointer to device buffer used as workspace. May be null when not required. Should not be less than expected
workspaceSizeSize of the workspace buffer
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenSaveSolution()

miopenStatus_t miopenSaveSolution ( miopenSolution_t  solution,
char *  data 
)

Saves a solution object as binary data.

Parameters
solutionSolution to save
dataPointer to a buffer to save soltuion to
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ 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
optionsOptions object to update
idSpecifies the id of the tensor passed
bufferSpecifies the tensor for find call
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ 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
optionsOptions object to update
bufferSpecifies the workspace for find call
sizeSpecifies the size of the buffer passed
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenSetFindOptionResultsOrder()

miopenStatus_t miopenSetFindOptionResultsOrder ( miopenFindOptions_t  options,
miopenFindResultsOrder_t  value 
)

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

Parameters
optionsOptions object to update
valueSpecifies what order should find results have
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenSetFindOptionTuning()

miopenStatus_t miopenSetFindOptionTuning ( miopenFindOptions_t  options,
int  value 
)

Sets the tuning find option. Default value is zero.

Parameters
optionsOptions object to update
valueValue of zero means no tuning, value of one means tuning enabled
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenSetFindOptionWorkspaceLimit()

miopenStatus_t miopenSetFindOptionWorkspaceLimit ( miopenFindOptions_t  options,
size_t  value 
)

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

Parameters
optionsOptions object to update
valueSpecifies the workspace limit for find call. All solvers exceeding the limit would be ignored.
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.

◆ miopenSetProblemTensorDescriptor()

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

Sets a tensor descriptor for the specified argument.

Parameters
problemProblem to update
idId of the argument for the descriptor
descriptorTensor descriptor to set
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h.