/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.1.1/include/miopen/miopen.h Source File#
miopen.h
Go to the documentation of this file.
478 1,
505 7,
507 8,
532 1,
552 1,
554 2,
556 3,
558 4,
560 5,
562 6,
636 MIOPEN_EXPORT miopenStatus_t miopenCreateTensorDescriptor(miopenTensorDescriptor_t* tensorDesc);
785 MIOPEN_EXPORT miopenStatus_t miopenDestroyTensorDescriptor(miopenTensorDescriptor_t tensorDesc);
930 MIOPEN_EXPORT miopenStatus_t miopenInitConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
963 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionSpatialDim(miopenConvolutionDescriptor_t convDesc,
981 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc,
1016 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1032 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc,
1048 miopenSetTransposeConvOutputPadding(miopenConvolutionDescriptor_t convDesc, int adj_h, int adj_w);
1125 MIOPEN_EXPORT miopenStatus_t miopenSetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1135 MIOPEN_EXPORT miopenStatus_t miopenGetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc,
1173 4,
2101 MIOPEN_EXPORT miopenStatus_t miopenCreatePoolingDescriptor(miopenPoolingDescriptor_t* poolDesc);
2180 MIOPEN_EXPORT miopenStatus_t miopenGet2dPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2249 MIOPEN_EXPORT miopenStatus_t miopenGetNdPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc,
2287 MIOPEN_EXPORT miopenStatus_t miopenPoolingGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc,
2378 MIOPEN_EXPORT miopenStatus_t miopenDestroyPoolingDescriptor(miopenPoolingDescriptor_t poolDesc);
2614 MIOPEN_EXPORT miopenStatus_t miopenDeriveBNTensorDescriptor(miopenTensorDescriptor_t derivedBnDesc,
3020 MIOPEN_EXPORT miopenStatus_t miopenCreateFusionPlan(miopenFusionPlanDescriptor_t* fusePlanDesc,
3029 MIOPEN_EXPORT miopenStatus_t miopenDestroyFusionPlan(miopenFusionPlanDescriptor_t fusePlanDesc);
3110 MIOPEN_EXPORT miopenStatus_t miopenCreateOpConvForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3151 MIOPEN_EXPORT miopenStatus_t miopenCreateOpBiasForward(miopenFusionPlanDescriptor_t fusePlanDesc,
3467 1,
4846 MIOPEN_EXPORT miopenStatus_t miopenCreateCTCLossDescriptor(miopenCTCLossDescriptor_t* ctcLossDesc);
4867 MIOPEN_EXPORT miopenStatus_t miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc);
4965 MIOPEN_EXPORT miopenStatus_t miopenCreateDropoutDescriptor(miopenDropoutDescriptor_t* dropoutDesc);
4972 MIOPEN_EXPORT miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc);
4982 MIOPEN_EXPORT miopenStatus_t miopenDropoutGetReserveSpaceSize(const miopenTensorDescriptor_t xDesc,
5043 MIOPEN_EXPORT miopenStatus_t miopenRestoreDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc,
5382 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionTuning(miopenFindOptions_t options, int value);
5410 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedWorkspace(miopenFindOptions_t options,
5422 MIOPEN_EXPORT miopenStatus_t miopenSetFindOptionPreallocatedTensor(miopenFindOptions_t options,
5587 MIOPEN_EXPORT miopenStatus_t miopenFuseProblems(miopenProblem_t problem1, miopenProblem_t problem2);
miopenStatus_t miopenCreateOpActivationBackward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activBwdOp, miopenActivationMode_t mode)
Creates a backward activation operator.
miopenStatus_t miopenCreateOpBatchNormForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnFwdOp, const miopenBatchNormMode_t bn_mode, bool runningMeanVariance)
Creates a forward training batch normalization operator.
miopenStatus_t miopenFusionPlanConvolutionGetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc, const int requestAlgoCount, int *returnedAlgoCount, miopenConvFwdAlgorithm_t *returnedAlgos)
Returns the supported algorithms for the convolution operator in the Fusion Plan.
miopenStatus_t miopenFusionPlanGetWorkSpaceSize(miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc, size_t *workSpaceSize, miopenConvFwdAlgorithm_t algo)
Query the workspace size required for the fusion plan.
miopenStatus_t miopenFusionPlanConvolutionSetAlgo(miopenFusionPlanDescriptor_t fusePlanDesc, miopenConvFwdAlgorithm_t algo)
Requests the fusion runtime to choose a particular algorithm for the added convolution operation.
miopenStatus_t miopenCreateOpBatchNormInference(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnOp, const miopenBatchNormMode_t bn_mode, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc)
Creates a forward inference batch normalization operator.
miopenStatus_t miopenSetOpArgsBiasForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t biasOp, const void *alpha, const void *beta, const void *bias)
Sets the arguments for forward bias op.
miopenStatus_t miopenCreateOpConvForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *convOp, miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t wDesc)
Creates forward convolution operator.
miopenStatus_t miopenSetOpArgsBatchNormInference(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *bnScale, const void *bnBias, const void *estimatedMean, const void *estimatedVariance, double epsilon)
Sets the arguments for inference batch normalization op.
miopenStatus_t miopenSetOpArgsBatchNormForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *bnScale, const void *bnBias, void *savedMean, void *savedInvVariance, void *runningMean, void *runningVariance, double expAvgFactor, double epsilon)
Sets the arguments for forward batch normalization op.
miopenStatus_t miopenExecuteFusionPlan(const miopenHandle_t handle, const miopenFusionPlanDescriptor_t fusePlanDesc, const miopenTensorDescriptor_t inputDesc, const void *input, const miopenTensorDescriptor_t outputDesc, void *output, miopenOperatorArgs_t args)
Executes the fusion plan.
miopenStatus_t miopenFusionPlanGetOp(miopenFusionPlanDescriptor_t fusePlanDesc, const int op_idx, miopenFusionOpDescriptor_t *op)
Allows access to the operators in a fusion plan.
miopenStatus_t miopenDestroyFusionPlan(miopenFusionPlanDescriptor_t fusePlanDesc)
Destroy the fusion plan descriptor object.
miopenStatus_t miopenCreateOpActivationForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activFwdOp, miopenActivationMode_t mode)
Creates a forward activation operator.
miopenFusionDirection_t
Kernel fusion direction in the network.
Definition: miopen.h:3008
miopenStatus_t miopenSetOpArgsActivBackward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t activBwdOp, const void *alpha, const void *beta, const void *y, const void *reserved, double activAlpha, double activBeta, double activGamma)
Sets the arguments for backward activation op.
miopenStatus_t miopenCompileFusionPlan(miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc)
Compiles the fusion plan.
miopenStatus_t miopenSetOpArgsBatchNormBackward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t bnOp, const void *alpha, const void *beta, const void *x, const void *bnScale, const void *bnBias, void *resultBnScaleDiff, void *resultBnBiasDiff, const void *savedMean, const void *savedInvVariance)
Sets the arguments for backward batch normalization op.
miopenStatus_t miopenSetOpArgsActivForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t activFwdOp, const void *alpha, const void *beta, double activAlpha, double activBeta, double activGamma)
Sets the arguments for forward activation op.
miopenStatus_t miopenDestroyOperatorArgs(miopenOperatorArgs_t args)
Destroys an operator argument object.
miopenStatus_t miopenCreateOpBatchNormBackward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnBwdOp, const miopenBatchNormMode_t bn_mode)
Creates a back propagation batch normalization operator.
miopenStatus_t miopenCreateOperatorArgs(miopenOperatorArgs_t *args)
Creates an operator argument object.
miopenStatus_t miopenSetOpArgsConvForward(miopenOperatorArgs_t args, const miopenFusionOpDescriptor_t convOp, const void *alpha, const void *beta, const void *w)
Sets the arguments for forward convolution op.
miopenStatus_t miopenConvolutionBiasActivationForward(miopenHandle_t handle, const void *alpha1, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t wDesc, const void *w, const miopenConvolutionDescriptor_t convDesc, miopenConvFwdAlgorithm_t algo, void *workspace, size_t workspaceSizeInBytes, const void *alpha2, const miopenTensorDescriptor_t zDesc, const void *z, const miopenTensorDescriptor_t biasDesc, const void *bias, const miopenActivationDescriptor_t activationDesc, const miopenTensorDescriptor_t yDesc, void *y)
Prepares and executes the Convlution+Bias+Activation Fusion.
miopenStatus_t miopenCreateFusionPlan(miopenFusionPlanDescriptor_t *fusePlanDesc, const miopenFusionDirection_t fuseDirection, const miopenTensorDescriptor_t inputDesc)
Creates the kenrel fusion plan descriptor object.
miopenStatus_t miopenCreateOpBiasForward(miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *biasOp, const miopenTensorDescriptor_t bDesc)
Creates a forward bias operator.
miopenStatus_t miopenSetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc, miopenLRNMode_t mode, unsigned int lrnN, double lrnAlpha, double lrnBeta, double lrnK)
Sets a LRN layer descriptor details.
miopenStatus_t miopenCreateLRNDescriptor(miopenLRNDescriptor_t *lrnDesc)
Creates a local response normalization (LRN) layer descriptor.
miopenStatus_t miopenGetLRNDescriptor(const miopenLRNDescriptor_t lrnDesc, miopenLRNMode_t *mode, unsigned int *lrnN, double *lrnAlpha, double *lrnBeta, double *lrnK)
Gets a LRN layer descriptor details.
miopenStatus_t miopenLRNBackward(miopenHandle_t handle, const miopenLRNDescriptor_t lrnDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, const void *workSpace)
Execute a LRN backward layer.
miopenStatus_t miopenLRNGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Determine the workspace requirements.
miopenStatus_t miopenLRNForward(miopenHandle_t handle, const miopenLRNDescriptor_t lrnDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, bool do_backward, void *workSpace)
Execute a LRN forward layer.
miopenStatus_t miopenDestroyLRNDescriptor(miopenLRNDescriptor_t lrnDesc)
Destroys the LRN descriptor object.
miopenStatus_t miopenGetCTCLossWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t probsDesc, const miopenTensorDescriptor_t gradientsDesc, const int *labels, const int *labelLengths, const int *inputLengths, miopenCTCLossAlgo_t algo, const miopenCTCLossDescriptor_t ctcLossDesc, size_t *workSpaceSize)
Query the amount of memory required to execute miopenCTCLoss.
miopenStatus_t miopenSetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc, miopenDataType_t dataType, const int blank_label_id, bool apply_softmax_layer)
Set the details of a CTC loss function descriptor.
miopenStatus_t miopenCTCLoss(miopenHandle_t handle, const miopenTensorDescriptor_t probsDesc, const void *probs, const int *labels, const int *labelLengths, const int *inputLengths, void *losses, const miopenTensorDescriptor_t gradientsDesc, void *gradients, miopenCTCLossAlgo_t algo, const miopenCTCLossDescriptor_t ctcLossDesc, void *workSpace, size_t workSpaceSize)
Execute forward inference for CTCLoss layer.
miopenStatus_t miopenGetCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc, miopenDataType_t *dataType, int *blank_label_id, bool *apply_softmax_layer)
Retrieves a CTC loss function descriptor's details.
miopenStatus_t miopenCreateCTCLossDescriptor(miopenCTCLossDescriptor_t *ctcLossDesc)
Create a CTC loss function Descriptor.
miopenStatus_t miopenDestroyCTCLossDescriptor(miopenCTCLossDescriptor_t ctcLossDesc)
Destroys a CTC loss function descriptor object.
miopenStatus_t miopenGetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc, int *hiddenSize, int *layer, miopenDropoutDescriptor_t *dropoutDesc, miopenRNNInputMode_t *inputMode, miopenRNNDirectionMode_t *dirMode, miopenRNNMode_t *rnnMode, miopenRNNBiasMode_t *biasMode, miopenRNNAlgo_t *algoMode, miopenDataType_t *dataType)
Retrieves a RNN layer descriptor's details version 2. This version enables retrieving information of ...
miopenStatus_t miopenSetRNNLayerBias(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, void *w, const int biasID, miopenTensorDescriptor_t biasDesc, const void *layerBias)
Sets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNBackwardWeightsSeqTensor(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const miopenSeqTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t hDesc, const void *hx, const miopenSeqTensorDescriptor_t yDesc, const void *y, void *dw, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, const void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward weights for recurrent layer.
miopenStatus_t miopenGetRNNParamsSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenTensorDescriptor_t xDesc, size_t *numBytes, miopenDataType_t dtype)
Query the amount of parameter memory required for RNN training.
miopenStatus_t miopenGetRNNLayerBiasOffset(miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int biasID, miopenTensorDescriptor_t biasDesc, size_t *layerBiasOffset)
Gets a bias index offset for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNLayerParamOffset(miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int paramID, miopenTensorDescriptor_t paramDesc, size_t *layerParamOffset)
Gets an index offset for a specific weight matrix for a layer in the RNN stack.
miopenStatus_t miopenRNNBackwardSeqData(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const miopenSeqTensorDescriptor_t yDesc, const void *y, const void *dy, const miopenTensorDescriptor_t hDesc, const void *hx, const void *dhy, void *dhx, const miopenTensorDescriptor_t cDesc, const void *cx, const void *dcy, void *dcx, const miopenSeqTensorDescriptor_t xDesc, void *dx, const void *w, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward data for recurrent layer.
miopenStatus_t miopenGetRNNLayerBias(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, const void *w, const int biasID, miopenTensorDescriptor_t biasDesc, void *layerBias)
Gets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNBackwardWeights(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t *yDesc, const void *y, const miopenTensorDescriptor_t dwDesc, void *dw, void *workSpace, size_t workSpaceNumBytes, const void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward weights for recurrent layer.
miopenStatus_t miopenGetRNNTrainingReserveSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Query the amount of memory required for RNN training.
miopenStatus_t miopenGetRNNLayerBiasSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, const int biasID, size_t *numBytes)
Gets the number of bytes of a bias.
miopenStatus_t miopenSetRNNDescriptor(miopenRNNDescriptor_t rnnDesc, const int hsize, const int nlayers, miopenRNNInputMode_t inMode, miopenRNNDirectionMode_t direction, miopenRNNMode_t rnnMode, miopenRNNBiasMode_t biasMode, miopenRNNAlgo_t algo, miopenDataType_t dataType)
Set the details of the RNN descriptor.
miopenStatus_t miopenRNNBackwardData(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *yDesc, const void *y, const miopenTensorDescriptor_t *dyDesc, const void *dy, const miopenTensorDescriptor_t dhyDesc, const void *dhy, const miopenTensorDescriptor_t dcyDesc, const void *dcy, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t *dxDesc, void *dx, const miopenTensorDescriptor_t dhxDesc, void *dhx, const miopenTensorDescriptor_t dcxDesc, void *dcx, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute backward data for recurrent layer.
miopenStatus_t miopenGetRNNDescriptor(miopenRNNDescriptor_t rnnDesc, miopenRNNMode_t *rnnMode, miopenRNNAlgo_t *algoMode, miopenRNNInputMode_t *inputMode, miopenRNNDirectionMode_t *dirMode, miopenRNNBiasMode_t *biasMode, int *hiddenSize, int *layer)
Retrieves a RNN layer descriptor's details.
miopenStatus_t miopenGetRNNTempSpaceSizes(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenSeqTensorDescriptor_t xDesc, miopenRNNFWDMode_t fwdMode, size_t *workSpaceSize, size_t *reserveSpaceSize)
Query the amount of additional memory required for this RNN layer execution.
miopenStatus_t miopenGetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc, miopenRNNPaddingMode_t *paddingMode)
This function retrieves the RNN padding mode from the RNN descriptor.
miopenStatus_t miopenRNNForward(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, miopenRNNFWDMode_t fwdMode, const miopenSeqTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t hDesc, const void *hx, void *hy, const miopenTensorDescriptor_t cDesc, const void *cx, void *cy, const miopenSeqTensorDescriptor_t yDesc, void *y, const void *w, size_t weightSpaceSize, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute forward training for recurrent layer.
miopenStatus_t miopenGetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc, miopenDataType_t *dataType, miopenRNNBaseLayout_t *layout, int *maxSequenceLen, int *batchSize, int *vectorSize, int sequenceLenArrayLimit, int *sequenceLenArray, void *paddingMarker)
Get shape of RNN seqData tensor.
miopenStatus_t miopenGetRNNInputTensorSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int seqLen, miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Obtain a the size in bytes of the RNN input tensor.
miopenStatus_t miopenSetRNNLayerParam(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, void *w, const int paramID, miopenTensorDescriptor_t paramDesc, const void *layerParam)
Sets a weight matrix for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNLayerParamSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, const int paramID, size_t *numBytes)
Gets the number of bytes of a parameter matrix.
miopenStatus_t miopenCreateRNNDescriptor(miopenRNNDescriptor_t *rnnDesc)
Create a RNN layer Descriptor.
miopenStatus_t miopenGetRNNLayerParam(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int layer, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, const void *w, const int paramID, miopenTensorDescriptor_t paramDesc, void *layerParam)
Gets a weight matrix for a specific layer in an RNN stack.
miopenStatus_t miopenGetRNNWorkspaceSize(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Query the amount of memory required to execute the RNN layer.
miopenStatus_t miopenSetRNNDataSeqTensorDescriptor(miopenSeqTensorDescriptor_t seqTensorDesc, miopenDataType_t dataType, miopenRNNBaseLayout_t layout, int maxSequenceLen, int batchSize, int vectorSize, const int *sequenceLenArray, void *paddingMarker)
Set shape of RNN seqData tensor.
miopenStatus_t miopenGetRNNParamsDescriptor(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, miopenTensorDescriptor_t xDesc, miopenTensorDescriptor_t wDesc, miopenDataType_t dtype)
Obtain a weight tensor descriptor for RNNs.
miopenStatus_t miopenRNNForwardTraining(miopenHandle_t handle, const miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t *yDesc, void *y, const miopenTensorDescriptor_t hyDesc, void *hy, const miopenTensorDescriptor_t cyDesc, void *cy, void *workSpace, size_t workSpaceNumBytes, void *reserveSpace, size_t reserveSpaceNumBytes)
Execute forward training for recurrent layer.
miopenStatus_t miopenSetRNNDescriptor_V2(miopenRNNDescriptor_t rnnDesc, const int hsize, const int nlayers, miopenDropoutDescriptor_t dropoutDesc, miopenRNNInputMode_t inMode, miopenRNNDirectionMode_t direction, miopenRNNMode_t rnnMode, miopenRNNBiasMode_t biasMode, miopenRNNAlgo_t algo, miopenDataType_t dataType)
Set the details of the RNN descriptor version 2. This version enables the use of dropout in rnn.
miopenStatus_t miopenDestroyRNNDescriptor(miopenRNNDescriptor_t rnnDesc)
Destroys the tensor descriptor object.
miopenStatus_t miopenGetRNNHiddenTensorSize(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int seqLen, miopenTensorDescriptor_t *xDesc, size_t *numBytes)
Obtain a the size in bytes of the RNN hidden tensor.
miopenStatus_t miopenSetRNNPaddingMode(miopenRNNDescriptor_t rnnDesc, miopenRNNPaddingMode_t paddingMode)
Sets a bias for a specific layer in an RNN stack.
miopenStatus_t miopenRNNForwardInference(miopenHandle_t handle, miopenRNNDescriptor_t rnnDesc, const int sequenceLen, const miopenTensorDescriptor_t *xDesc, const void *x, const miopenTensorDescriptor_t hxDesc, const void *hx, const miopenTensorDescriptor_t cxDesc, const void *cx, const miopenTensorDescriptor_t wDesc, const void *w, const miopenTensorDescriptor_t *yDesc, void *y, const miopenTensorDescriptor_t hyDesc, void *hy, const miopenTensorDescriptor_t cyDesc, void *cy, void *workSpace, size_t workSpaceNumBytes)
Execute forward inference for RNN layer.
miopenStatus_t miopenSetReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc, miopenReduceTensorOp_t reduceTensorOp, miopenDataType_t reduceTensorCompType, miopenNanPropagation_t reduceTensorNanOpt, miopenReduceTensorIndices_t reduceTensorIndices, miopenIndicesType_t reduceTensorIndicesType)
Initialize a ReduceTensor descriptor object.
miopenStatus_t miopenCreateReduceTensorDescriptor(miopenReduceTensorDescriptor_t *reduceTensorDesc)
Creates the ReduceTensor descriptor object.
miopenStatus_t miopenReduceTensor(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, void *indices, size_t indicesSizeInBytes, void *workspace, size_t workspaceSizeInBytes, const void *alpha, const miopenTensorDescriptor_t aDesc, const void *A, const void *beta, const miopenTensorDescriptor_t cDesc, void *C)
TensorReduce function doing reduction on tensor A by implementing C = alpha * reduceOp(A)
miopenStatus_t miopenGetReductionIndicesSize(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, const miopenTensorDescriptor_t aDesc, const miopenTensorDescriptor_t cDesc, size_t *sizeInBytes)
Helper function to query the minimum index space size required by the ReduceTensor call.
miopenStatus_t miopenDestroyReduceTensorDescriptor(miopenReduceTensorDescriptor_t reduceTensorDesc)
Destroy the ReduceTensor descriptor object.
miopenStatus_t miopenGetReductionWorkspaceSize(miopenHandle_t handle, const miopenReduceTensorDescriptor_t reduceTensorDesc, const miopenTensorDescriptor_t aDesc, const miopenTensorDescriptor_t cDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the ReduceTensor call.
miopenStatus_t miopenGetReduceTensorDescriptor(const miopenReduceTensorDescriptor_t reduceTensorDesc, miopenReduceTensorOp_t *reduceTensorOp, miopenDataType_t *reduceTensorCompType, miopenNanPropagation_t *reduceTensorNanOpt, miopenReduceTensorIndices_t *reduceTensorIndices, miopenIndicesType_t *reduceTensorIndicesType)
Query a ReduceTensor descriptor object.
miopenStatus_t miopenActivationForward(miopenHandle_t handle, const miopenActivationDescriptor_t activDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Execute an activation forward layer.
miopenStatus_t miopenActivationBackward(miopenHandle_t handle, const miopenActivationDescriptor_t activDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx)
Execute a activation backwards layer.
miopenStatus_t miopenSetActivationDescriptor(const miopenActivationDescriptor_t activDesc, miopenActivationMode_t mode, double activAlpha, double activBeta, double activGamma)
Sets the activation layer descriptor details.
miopenStatus_t miopenCreateActivationDescriptor(miopenActivationDescriptor_t *activDesc)
Creates the Activation descriptor object.
miopenStatus_t miopenGetActivationDescriptor(const miopenActivationDescriptor_t activDesc, miopenActivationMode_t *mode, double *activAlpha, double *activBeta, double *activGamma)
Gets the activation layer descriptor details.
miopenStatus_t miopenDestroyActivationDescriptor(miopenActivationDescriptor_t activDesc)
Destroys the activation descriptor object.
miopenStatus_t miopenArgmaxForward(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const void *x, const int32_t dim, const miopenTensorDescriptor_t yDesc, void *y)
Find the index of the maximum value of a tensor across dimensions. To enable this,...
miopenStatus_t miopenBatchNormalizationForwardInference(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc, void *bnScale, void *bnBias, void *estimatedMean, void *estimatedVariance, double epsilon)
Execute forward inference layer for batch normalization.
miopenStatus_t miopenBatchNormalizationForwardTraining(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, void *alpha, void *beta, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t bnScaleBiasMeanVarDesc, void *bnScale, void *bnBias, double expAvgFactor, void *resultRunningMean, void *resultRunningVariance, double epsilon, void *resultSaveMean, void *resultSaveInvVariance)
Execute forward training layer for batch normalization.
miopenStatus_t miopenBatchNormalizationBackward(miopenHandle_t handle, miopenBatchNormMode_t bn_mode, const void *alphaDataDiff, const void *betaDataDiff, const void *alphaParamDiff, const void *betaParamDiff, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t dxDesc, void *dx, const miopenTensorDescriptor_t bnScaleBiasDiffDesc, const void *bnScale, void *resultBnScaleDiff, void *resultBnBiasDiff, double epsilon, const void *savedMean, const void *savedInvVariance)
Execute backwards propagation layer for batch normalization.
miopenStatus_t miopenDeriveBNTensorDescriptor(miopenTensorDescriptor_t derivedBnDesc, const miopenTensorDescriptor_t xDesc, miopenBatchNormMode_t bn_mode)
Derive tensor for gamma and beta from input tensor descriptor.
miopenStatus_t miopenCatForward(miopenHandle_t handle, const int32_t xCount, const miopenTensorDescriptor_t *xDescs, const void *const *xs, const miopenTensorDescriptor_t yDesc, void *y, const int32_t dim)
Execute a cat forward layer.
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 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 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 miopenConvolutionBac...
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 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 miopenGetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc, int *groupCount)
Get the number of groups to be used in Group/Depthwise convolution.
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 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 miopenGetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int *value)
Get the attribute of the convolution descriptor.
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 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 miopenConvolutionBac...
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 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 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 layer.
miopenStatus_t miopenCreateConvolutionDescriptor(miopenConvolutionDescriptor_t *convDesc)
Creates a convolution layer descriptor.
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,...
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 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 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 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 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,...
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 miopenSetConvolutionAttribute(miopenConvolutionDescriptor_t convDesc, const miopenConvolutionAttrib_t attr, int value)
Set the attribute of the convolution descriptor.
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 miopenSetTransposeConvNdOutputPadding(miopenConvolutionDescriptor_t convDesc, int spatialDim, const int *adjA)
Set the output padding to be used in N-dimensional Transpose 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 miopenGetConvolutionSpatialDim(miopenConvolutionDescriptor_t convDesc, int *spatialDim)
Retrieves the spatial dimension of a convolution layer descriptor.
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 miopenConvolutionFor...
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 descri...
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 miopenConvolutionBackwardDataGetWorkSpaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t dyDesc, const miopenTensorDescriptor_t wDesc, const miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t dxDesc, size_t *workSpaceSize)
Get the GPU memory required for the backward data 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 miopenDestroyConvolutionDescriptor(miopenConvolutionDescriptor_t convDesc)
Destroys the tensor descriptor object.
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 descri...
miopenStatus_t miopenSetConvolutionGroupCount(miopenConvolutionDescriptor_t convDesc, int groupCount)
Set the number of groups to be used in Group/Depthwise convolution.
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 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,...
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 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 descri...
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 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.
@ miopenConvolutionBwdDataAlgoImplicitGEMM
Definition: miopen.h:1174
@ miopenConvolutionBwdWeightsAlgoWinograd
Definition: miopen.h:1159
@ miopenConvolutionBwdWeightsAlgoDirect
Definition: miopen.h:1158
@ miopenConvolutionBwdWeightsAlgoImplicitGEMM
Definition: miopen.h:1160
miopenStatus_t miopenDestroyDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc)
Destroys the dropout descriptor object.
miopenStatus_t miopenDropoutGetStatesSize(miopenHandle_t handle, size_t *stateSizeInBytes)
Query the amount of memory required to store the states of the random number generators.
miopenStatus_t miopenDropoutGetReserveSpaceSize(const miopenTensorDescriptor_t xDesc, size_t *reserveSpaceSizeInBytes)
Query the amount of memory required to run dropout.
miopenStatus_t miopenDropoutForward(miopenHandle_t handle, const miopenDropoutDescriptor_t dropoutDesc, const miopenTensorDescriptor_t noise_shape, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t yDesc, void *y, void *reserveSpace, size_t reserveSpaceSizeInBytes)
Execute forward dropout operation.
miopenStatus_t miopenGetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float *dropout, void **states, unsigned long long *seed, bool *use_mask, bool *state_evo, miopenRNGType_t *rng_mode)
Get the details of the dropout descriptor.
miopenStatus_t miopenCreateDropoutDescriptor(miopenDropoutDescriptor_t *dropoutDesc)
Creates the dropout descriptor object.
miopenStatus_t miopenDropoutBackward(miopenHandle_t handle, const miopenDropoutDescriptor_t dropoutDesc, const miopenTensorDescriptor_t noise_shape, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t dxDesc, void *dx, void *reserveSpace, size_t reserveSpaceSizeInBytes)
Execute backward dropout operation.
miopenStatus_t miopenRestoreDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float dropout, void *states, size_t stateSizeInBytes, unsigned long long seed, bool use_mask, bool state_evo, miopenRNGType_t rng_mode)
Restore the dropout descriptor to a saved state.
miopenStatus_t miopenSetDropoutDescriptor(miopenDropoutDescriptor_t dropoutDesc, miopenHandle_t handle, float dropout, void *states, size_t stateSizeInBytes, unsigned long long seed, bool use_mask, bool state_evo, miopenRNGType_t rng_mode)
Initialize the dropout descriptor.
miopenStatus_t miopenGetSolutionSolverId(miopenSolution_t solution, uint64_t *solverId)
Reads id of the solver referred by 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 miopenSetFindOptionWorkspaceLimit(miopenFindOptions_t options, size_t value)
Sets the workspace limit find option. Default value is maximum of size_t.
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 internal...
miopenStatus_t miopenDestroyFindOptions(miopenFindOptions_t options)
Destroys miopenFindOptions object.
miopenStatus_t miopenFuseProblems(miopenProblem_t problem1, miopenProblem_t problem2)
miopenStatus_t miopenGetSolutionSize(miopenSolution_t solution, size_t *size)
Reads the expected size of a 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 alloc...
miopenStatus_t miopenSetFindOptionTuning(miopenFindOptions_t options, int value)
Sets the tuning find option. Default value is zero.
miopenStatus_t miopenGetSolutionWorkspaceSize(miopenSolution_t solution, size_t *workspaceSize)
Reads the amount of workspace required to exectute the solution.
miopenStatus_t miopenSetFindOptionResultsOrder(miopenFindOptions_t options, miopenFindResultsOrder_t value)
Sets the results order find option. Default value is miopenFindResultsOrderByTime.
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 miopenGetSolverIdConvAlgorithm(uint64_t solverId, miopenConvAlgorithm_t *result)
Gets the convolution algorithm implemented by a solver.
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 miopenCreateActivationProblem(miopenProblem_t *problem, miopenActivationDescriptor_t operatorDesc, miopenProblemDirection_t direction)
Initializes a problem object describing an activation operation.
miopenStatus_t miopenDestroyProblem(miopenProblem_t problem)
Destroys a problem object.
miopenStatus_t miopenCreateFindOptions(miopenFindOptions_t *options)
Initializes miopenFindOptions object.
miopenStatus_t miopenCreateConvProblem(miopenProblem_t *problem, miopenConvolutionDescriptor_t operatorDesc, miopenProblemDirection_t direction)
Initializes a problem object describing a convolution operation.
miopenStatus_t miopenCreateBiasProblem(miopenProblem_t *problem, miopenProblemDirection_t direction)
Initializes a problem object describing an bias operation.
miopenStatus_t miopenSetProblemTensorDescriptor(miopenProblem_t problem, miopenTensorArgumentId_t id, const miopenTensorDescriptor_t descriptor)
Sets a tensor descriptor for the specified argument.
@ miopenFindResultsOrderByWorkspaceSize
Definition: miopen.h:5325
@ miopenProblemDirectionBackwardWeights
Definition: miopen.h:5296
miopenStatus_t miopenGroupNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const uint64_t num_groups, const float epsilon, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a groupnorm forward layer.
miopenStatus_t miopenCreateWithStream(miopenHandle_t *handle, miopenAcceleratorQueue_t stream)
Create a MIOpen handle with an accelerator stream.
void(* miopenDeallocatorFunction)(void *context, void *memory)
Custom deallocator function.
Definition: miopen.h:154
miopenStatus_t miopenGetStream(miopenHandle_t handle, miopenAcceleratorQueue_t *streamID)
Get the previously created accelerator command queue.
miopenStatus_t miopenEnableProfiling(miopenHandle_t handle, bool enable)
Enable profiling to retrieve kernel time.
miopenStatus_t miopenGetVersion(size_t *major, size_t *minor, size_t *patch)
Method to return version of MIOpen.
miopenStatus_t miopenSetAllocator(miopenHandle_t handle, miopenAllocatorFunction allocator, miopenDeallocatorFunction deallocator, void *allocatorContext)
Set allocator for previously created miopenHandle.
void *(* miopenAllocatorFunction)(void *context, size_t sizeBytes)
Custom allocator function.
Definition: miopen.h:144
const char * miopenGetErrorString(miopenStatus_t error)
Get character string for an error code.
miopenStatus_t miopenCreate(miopenHandle_t *handle)
Method to create the MIOpen handle object.
miopenStatus_t miopenGetKernelTime(miopenHandle_t handle, float *time)
Get time for last kernel launched.
miopenStatus_t miopenSetStream(miopenHandle_t handle, miopenAcceleratorQueue_t streamID)
Set accelerator command queue previously created.
miopenStatus_t miopenLayerNormForward(miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const float epsilon, const int32_t normalized_dim, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd)
Execute a layernorm forward layer.
miopenStatus_t miopenSet2dPoolingDescriptor(miopenPoolingDescriptor_t poolDesc, miopenPoolingMode_t mode, int windowHeight, int windowWidth, int pad_h, int pad_w, int stride_h, int stride_w)
Sets a 2-D pooling layer descriptor details.
miopenStatus_t miopenSetPoolingWorkSpaceIndexMode(miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t workspace_index)
Set workspace index mode for pooling layer. The default mode is miopenPoolingWorkSpaceIndexMask.
miopenStatus_t miopenGetPoolingForwardOutputDim(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t tensorDesc, int *n, int *c, int *h, int *w)
Gets the shape of the output tensor for 2-D pooling.
miopenStatus_t miopenPoolingGetWorkSpaceSize(const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Get the amount of GPU memory required for pooling.
miopenStatus_t miopenSetNdPoolingDescriptor(miopenPoolingDescriptor_t poolDesc, const miopenPoolingMode_t mode, int nbDims, const int *windowDimA, const int *padA, const int *stridesA)
Set details of a N-D pooling layer descriptor.
miopenStatus_t miopenPoolingForward(miopenHandle_t handle, const miopenPoolingDescriptor_t poolDesc, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, bool do_backward, void *workSpace, size_t workSpaceSize)
Execute a forward pooling layer.
miopenStatus_t miopenPoolingGetWorkSpaceSizeV2(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t yDesc, size_t *workSpaceSize)
Get the amount of GPU memory required for pooling.
miopenStatus_t miopenGetPoolingWorkSpaceIndexMode(miopenPoolingDescriptor_t poolDesc, miopenPoolingWorkspaceIndexMode_t *workspace_index)
Get workspace index mode for pooling layer.
miopenStatus_t miopenGetPoolingIndexType(miopenPoolingDescriptor_t poolDesc, miopenIndexType_t *index_type)
Get the index data type for pooling layer. The index type to any of the miopenIndexType_t sizes; 8,...
miopenStatus_t miopenGetPoolingNdForwardOutputDim(const miopenPoolingDescriptor_t poolDesc, const miopenTensorDescriptor_t tensorDesc, int dims, int *tensorDimArr)
Gets the shape of the output tensor for N-D pooling.
miopenStatus_t miopenGetNdPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc, int nbDimsRequested, miopenPoolingMode_t *mode, int *nbDims, int *windowDimA, int *padA, int *stridesA)
Get details of a N-D pooling layer descriptor.
miopenStatus_t miopenCreatePoolingDescriptor(miopenPoolingDescriptor_t *poolDesc)
Creates a pooling layer descriptor.
miopenStatus_t miopenSetPoolingIndexType(miopenPoolingDescriptor_t poolDesc, miopenIndexType_t index_type)
Set index data type for pooling layer. The default indexing type is uint8_t. Users can set the index ...
miopenStatus_t miopenGet2dPoolingDescriptor(const miopenPoolingDescriptor_t poolDesc, miopenPoolingMode_t *mode, int *windowHeight, int *windowWidth, int *pad_h, int *pad_w, int *stride_h, int *stride_w)
Gets a 2-D pooling layer descriptor details.
miopenStatus_t miopenDestroyPoolingDescriptor(miopenPoolingDescriptor_t poolDesc)
Destroys the pooling descriptor object.
miopenStatus_t miopenPoolingBackward(miopenHandle_t handle, const miopenPoolingDescriptor_t poolDesc, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, void *workSpace)
Execute a backward pooling layer.
miopenStatus_t miopenSoftmaxBackward_V2(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
Execute a softmax backwards layer with expanded modes and algorithms.
miopenStatus_t miopenSoftmaxForward(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Execute a softmax forward layer.
miopenStatus_t miopenSoftmaxForward_V2(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y, miopenSoftmaxAlgorithm_t algorithm, miopenSoftmaxMode_t mode)
Execute a softmax forward layer with expanded modes and algorithms.
miopenStatus_t miopenSoftmaxBackward(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t yDesc, const void *y, const miopenTensorDescriptor_t dyDesc, const void *dy, const void *beta, const miopenTensorDescriptor_t dxDesc, void *dx)
Execute a softmax backwards layer.
miopenStatus_t miopenSumForward(miopenHandle_t handle, miopenSumNanPropagation_t nanPropagation, void *workspace, size_t workspaceSizeInBytes, const miopenTensorDescriptor_t xDesc, const void *x, const int32_t dim, const miopenTensorDescriptor_t yDesc, void *y)
Execute a sum forward layer.
miopenStatus_t miopenGetSumWorkspaceSize(miopenHandle_t handle, const miopenTensorDescriptor_t xDesc, const int32_t dim, const miopenTensorDescriptor_t yDesc, size_t *sizeInBytes)
Helper function to query the minimum workspace size required by the ReduceTensor call.
miopenStatus_t miopenDestroySeqTensorDescriptor(miopenSeqTensorDescriptor_t tensorDesc)
Destroys the sequence data tensor descriptor.
miopenStatus_t miopenGetTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t *dataType, int *dimsA, int *stridesA)
Get the details of the N-dimensional tensor descriptor.
miopenStatus_t miopenSetNdTensorDescriptorWithLayout(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, miopenTensorLayout_t tensorLayout, const int *lens, int num_lens)
Set shape of ND tensor with specific layout.
miopenStatus_t miopenSetTensor(miopenHandle_t handle, const miopenTensorDescriptor_t yDesc, void *y, const void *alpha)
Fills a tensor with a single value.
miopenStatus_t miopenOpTensor(miopenHandle_t handle, miopenTensorOp_t tensorOp, const void *alpha1, const miopenTensorDescriptor_t aDesc, const void *A, const void *alpha2, const miopenTensorDescriptor_t bDesc, const void *B, const void *beta, const miopenTensorDescriptor_t cDesc, void *C)
Execute element-wise tensor operations.
miopenStatus_t miopenGetTensorNumBytes(miopenTensorDescriptor_t tensorDesc, size_t *numBytes)
Returns number of bytes associated with tensor descriptor.
miopenStatus_t miopenGet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t *dataType, int *n, int *c, int *h, int *w, int *nStride, int *cStride, int *hStride, int *wStride)
Get the details of the tensor descriptor.
miopenStatus_t miopenTransformTensor(miopenHandle_t handle, const void *alpha, const miopenTensorDescriptor_t xDesc, const void *x, const void *beta, const miopenTensorDescriptor_t yDesc, void *y)
Copies one tensor to another tensor with a different layout/scale.
miopenStatus_t miopenCreateTensorDescriptor(miopenTensorDescriptor_t *tensorDesc)
Create a Tensor Descriptor.
miopenStatus_t miopenScaleTensor(miopenHandle_t handle, const miopenTensorDescriptor_t yDesc, void *y, const void *alpha)
Scales all elements in a tensor by a single value.
miopenStatus_t miopenSetTensorCastType(miopenTensorDescriptor_t tensorDesc, miopenDataType_t cast_type)
Set the tensor cast type.
miopenStatus_t miopenSet4dTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w)
Set shape of 4D tensor.
miopenStatus_t miopenSet4dTensorDescriptorEx(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int n, int c, int h, int w, int nStride, int cStride, int hStride, int wStride)
Set shape and stride of 4D tensor.
miopenStatus_t miopenCreateSeqTensorDescriptor(miopenSeqTensorDescriptor_t *tensorDesc)
Create a Tensor Descriptor for sequence data.
miopenStatus_t miopenGetTensorDescriptorSize(miopenTensorDescriptor_t tensorDesc, int *size)
Set shape of N-dimensional tensor.
miopenStatus_t miopenDestroyTensorDescriptor(miopenTensorDescriptor_t tensorDesc)
Destroys the tensor descriptor.
miopenStatus_t miopenSetTensorDescriptor(miopenTensorDescriptor_t tensorDesc, miopenDataType_t dataType, int nbDims, const int *dimsA, const int *stridesA)
Set shape of N-dimensional tensor.
@ MIOPEN_REDUCE_TENSOR_FLATTENED_INDICES
Definition: miopen.h:586
@ MIOPEN_CONVOLUTION_ATTRIB_DETERMINISTIC
Definition: miopen.h:611
@ MIOPEN_CONVOLUTION_ATTRIB_FP8_ROUNDING_MODE
Definition: miopen.h:615
@ MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL
Definition: miopen.h:607
Perf struct for forward, backward filter, or backward data algorithms.
Definition: miopen.h:1196
miopenConvBwdDataAlgorithm_t bwd_data_algo
Definition: miopen.h:1203
miopenConvBwdWeightsAlgorithm_t bwd_weights_algo
Definition: miopen.h:1200
Performance struct for forward, backward filter, or backward data algorithms in immediate mode.
Definition: miopen.h:1220
Values of a tensor argument for the miopenRunSolution function.
Definition: miopen.h:5451