FUSION

FUSION#

MIOpen: FUSION

Enumerations

enum  miopenFusionDirection_t {
  miopenVerticalFusion = 0 ,
  miopenHorizontalFusion = 1
}
 Kernel fusion direction in the network. More...
 

Functions

 MIOPEN_DECLARE_OBJECT (miopenFusionPlanDescriptor)
 MIOpen fusion interface. More...
 
miopenStatus_t miopenCreateFusionPlan (miopenFusionPlanDescriptor_t *fusePlanDesc, const miopenFusionDirection_t fuseDirection, const miopenTensorDescriptor_t inputDesc)
 Creates the kenrel fusion plan descriptor object. More...
 
miopenStatus_t miopenDestroyFusionPlan (miopenFusionPlanDescriptor_t fusePlanDesc)
 Destroy the fusion plan descriptor object. More...
 
miopenStatus_t miopenCompileFusionPlan (miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc)
 Compiles the fusion plan. More...
 
miopenStatus_t miopenFusionPlanGetOp (miopenFusionPlanDescriptor_t fusePlanDesc, const int op_idx, miopenFusionOpDescriptor_t *op)
 Allows access to the operators in a fusion plan. More...
 
miopenStatus_t miopenFusionPlanGetWorkSpaceSize (miopenHandle_t handle, miopenFusionPlanDescriptor_t fusePlanDesc, size_t *workSpaceSize, miopenConvFwdAlgorithm_t algo)
 Query the workspace size required for the fusion plan. More...
 
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. More...
 
miopenStatus_t miopenFusionPlanConvolutionSetAlgo (miopenFusionPlanDescriptor_t fusePlanDesc, miopenConvFwdAlgorithm_t algo)
 Requests the fusion runtime to choose a particular algorithm for the added convolution operation. More...
 
miopenStatus_t miopenCreateOpConvForward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *convOp, miopenConvolutionDescriptor_t convDesc, const miopenTensorDescriptor_t wDesc)
 Creates forward convolution operator. More...
 
miopenStatus_t miopenCreateOpActivationForward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activFwdOp, miopenActivationMode_t mode)
 Creates a forward activation operator. More...
 
miopenStatus_t miopenCreateOpActivationBackward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *activBwdOp, miopenActivationMode_t mode)
 Creates a backward activation operator. More...
 
miopenStatus_t miopenCreateOpBiasForward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *biasOp, const miopenTensorDescriptor_t bDesc)
 Creates a forward bias operator. More...
 
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. More...
 
miopenStatus_t miopenCreateOpBatchNormForward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnFwdOp, const miopenBatchNormMode_t bn_mode, bool runningMeanVariance)
 Creates a forward training batch normalization operator. More...
 
miopenStatus_t miopenCreateOpBatchNormBackward (miopenFusionPlanDescriptor_t fusePlanDesc, miopenFusionOpDescriptor_t *bnBwdOp, const miopenBatchNormMode_t bn_mode)
 Creates a back propagation batch normalization operator. More...
 
miopenStatus_t miopenCreateOperatorArgs (miopenOperatorArgs_t *args)
 Creates an operator argument object. More...
 
miopenStatus_t miopenDestroyOperatorArgs (miopenOperatorArgs_t args)
 Destroys an operator argument object. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Enumeration Type Documentation

◆ miopenFusionDirection_t

Kernel fusion direction in the network.

Enumerator
miopenVerticalFusion 

fuses layers vertically, current the only supported mode

miopenHorizontalFusion 

fuses layers horizontally, this is unimplemented

Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

Function Documentation

◆ MIOPEN_DECLARE_OBJECT()

MIOPEN_DECLARE_OBJECT ( miopenFusionPlanDescriptor  )

MIOpen fusion interface.

◆ miopenCompileFusionPlan()

miopenStatus_t miopenCompileFusionPlan ( miopenHandle_t  handle,
miopenFusionPlanDescriptor_t  fusePlanDesc 
)

Compiles the fusion plan.

Parameters
handleMIOpen handle (input)
fusePlanDescA fusion plan descriptor (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenConvolutionBiasActivationForward()

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.

Parameters
handleMIOpen handle (input)
alpha1floating point scaling factor, allocated on the host (input)
xDescTensor descriptor for input data tensor x (input)
xData tensor x (input)
wDescTensor descriptor for weight tensor w (input)
wWeights tensor w (input)
convDescConvolution layer descriptor (input)
algoAlgorithm selected (inputs)
workspacePointer to workspace required (input)
workspaceSizeInBytesSize of the memory in bytes pointed to by workSpace above
alpha2floating point scaling factor, allocated on the host (input)
zDescTensor descriptor for tensor z (input)
zData tensor z (input)
biasDescTensor descriptor for input data tensor x (input)
biasData tensor bias (input)
activationDescActivation descriptor that specifies the activation mode
yDescTensor descriptor for output data tensor y (input)
yOutput data tensor
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateFusionPlan()

miopenStatus_t miopenCreateFusionPlan ( miopenFusionPlanDescriptor_t *  fusePlanDesc,
const miopenFusionDirection_t  fuseDirection,
const miopenTensorDescriptor_t  inputDesc 
)

Creates the kenrel fusion plan descriptor object.

Parameters
fusePlanDescPointer to a fusion plan (output)
fuseDirectionHorizontal or Vertical fusion (input)
inputDescDescriptor to tensor for the input (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpActivationBackward()

miopenStatus_t miopenCreateOpActivationBackward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  activBwdOp,
miopenActivationMode_t  mode 
)

Creates a backward activation operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
activBwdOpPointer to an operator type (output)
modeActivation version (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpActivationForward()

miopenStatus_t miopenCreateOpActivationForward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  activFwdOp,
miopenActivationMode_t  mode 
)

Creates a forward activation operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
activFwdOpPointer to an operator type (output)
modeActivation version (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpBatchNormBackward()

miopenStatus_t miopenCreateOpBatchNormBackward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  bnBwdOp,
const miopenBatchNormMode_t  bn_mode 
)

Creates a back propagation batch normalization operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
bnBwdOpPointer to an operator type (output)
bn_modeBatch normalization layer mode (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpBatchNormForward()

miopenStatus_t miopenCreateOpBatchNormForward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  bnFwdOp,
const miopenBatchNormMode_t  bn_mode,
bool  runningMeanVariance 
)

Creates a forward training batch normalization operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
bnFwdOpPointer to an operator type (output)
bn_modeBatch normalization layer mode (input)
runningMeanVarianceToggles whether or not to save population statistics for inference; batch statistic are required (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpBatchNormInference()

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.

Parameters
fusePlanDescA fusion plan descriptor (input)
bnOpPointer to an operator type (output)
bn_modeBatch normalization layer mode (input)
bnScaleBiasMeanVarDescGamma, beta, mean, variance tensor descriptor (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpBiasForward()

miopenStatus_t miopenCreateOpBiasForward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  biasOp,
const miopenTensorDescriptor_t  bDesc 
)

Creates a forward bias operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
biasOpPointer to an operator type (output)
bDescbias tensor descriptor (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOpConvForward()

miopenStatus_t miopenCreateOpConvForward ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenFusionOpDescriptor_t *  convOp,
miopenConvolutionDescriptor_t  convDesc,
const miopenTensorDescriptor_t  wDesc 
)

Creates forward convolution operator.

Parameters
fusePlanDescA fusion plan descriptor (input)
convOpPointer to an operator type (output)
convDescConvolution layer descriptor (input)
wDescDescriptor for the weights tensor (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenCreateOperatorArgs()

miopenStatus_t miopenCreateOperatorArgs ( miopenOperatorArgs_t *  args)

Creates an operator argument object.

Parameters
argsPointer to an operator argument type (output)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenDestroyFusionPlan()

miopenStatus_t miopenDestroyFusionPlan ( miopenFusionPlanDescriptor_t  fusePlanDesc)

Destroy the fusion plan descriptor object.

Parameters
fusePlanDescA fusion plan descriptor type
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenDestroyOperatorArgs()

miopenStatus_t miopenDestroyOperatorArgs ( miopenOperatorArgs_t  args)

Destroys an operator argument object.

Parameters
argsAn operator argument type (output)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenExecuteFusionPlan()

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.

Parameters
handleMIOpen handle (input)
fusePlanDescfused plan descriptor (input)
inputDescDescriptor of the input tensor (input)
inputSource data tensor (input)
outputDescDecriptor of the output tensor (input)
outputDestination data tensor (output)
argsAn argument object of the fused kernel (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenFusionPlanConvolutionGetAlgo()

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.

A Convolution operator in a fusion plan may be implemented by different algorithms representing different tradeoffs of memory and performance. The returned list of algorithms is sorted in decreasing order of priority. Therefore, if the user does not request an algorithm to be set using the miopenFusionPlanConvolutionSetAlgo call, the first algorithm in the list would be used to execute the convolution in the fusion plan. Moreover this call must be immediately preceded by the miopenCreateOpConvForward call for the op in question.

Parameters
fusePlanDescA fusion plan descriptor (input)
requestAlgoCountNumber of algorithms to return (input)
returnedAlgoCountThe actual number of returned algorithms; always be less than equal to requestAlgoCount (output)
returnedAlgosPointer to the list of supported algorithms
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenFusionPlanConvolutionSetAlgo()

miopenStatus_t miopenFusionPlanConvolutionSetAlgo ( miopenFusionPlanDescriptor_t  fusePlanDesc,
miopenConvFwdAlgorithm_t  algo 
)

Requests the fusion runtime to choose a particular algorithm for the added convolution operation.

Please see the description for miopenFusionPlanConvolutionGetAlgo

Parameters
fusePlanDescA fusion plan descriptor (input)
algoRequested algorithm for the convolution operator (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenFusionPlanGetOp()

miopenStatus_t miopenFusionPlanGetOp ( miopenFusionPlanDescriptor_t  fusePlanDesc,
const int  op_idx,
miopenFusionOpDescriptor_t *  op 
)

Allows access to the operators in a fusion plan.

This api call does bounds checking on the supplied op_idx and would return miopenStatusError if the index is out of bounds

Parameters
fusePlanDescA fusion plan descriptor (input)
op_idxIndex of the required operator in the fusion plan, in the order of insertion
opreturned pointer to the operator
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenFusionPlanGetWorkSpaceSize()

miopenStatus_t miopenFusionPlanGetWorkSpaceSize ( miopenHandle_t  handle,
miopenFusionPlanDescriptor_t  fusePlanDesc,
size_t *  workSpaceSize,
miopenConvFwdAlgorithm_t  algo 
)

Query the workspace size required for the fusion plan.

Parameters
handleMIOpen handle (input)
fusePlanDescA fusion plan descriptor (input)
workSpaceSizePointer to memory to return size in bytes (output)
algoAlgorithm selected (inputs)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsActivBackward()

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.

Parameters
argsAn arguments object type (output)
activBwdOpActivation backwards operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
yData tensor y, output of activations in the forward direction (input)
reservedData tensor reserved memory space; currently should be nullptr (input)
activAlphaDouble precision activation parameter which depends on activation mode (input)
activBetaDouble precision activation parameter which depends on activation mode (input)
activGammaDouble precision activation parameter which depends on activation mode (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsActivForward()

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.

Parameters
argsAn arguments object type (output)
activFwdOpActivation backwards operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
activAlphaDouble precision activation parameter which depends on activation mode (input)
activBetaDouble precision activation parameter which depends on activation mode (input)
activGammaDouble precision activation parameter which depends on activation mode (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsBatchNormBackward()

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.

Parameters
argsAn arguments object type (output)
bnOpBatch normalization forward operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
xPointer to the forward input tensor memory (input)
bnScalePointer to the gamma tensor memory (input)
bnBiasPointer to the beta tensor memory (input)
resultBnScaleDiffPointer to the gamma gradient tensor memory (output)
resultBnBiasDiffPointer to the beta gradient tensor memory (output)
savedMeanPointer to batch mean memory (input)
savedInvVariancePointer to batch inverse variance memory (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsBatchNormForward()

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.

Parameters
argsAn arguments object type (output)
bnOpBatch normalization forward operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
bnScalePointer to the gamma tensor memory (input)
bnBiasPointer to the beta tensor memory (input)
savedMeanPointer to batch mean memory (input)
savedInvVariancePointer to batch inverse variance memory (input)
runningMeanPointer to population mean memory (input)
runningVariancePointer to population variance memory (input)
expAvgFactorScalar value for control of population statistics (input)
epsilonScalar value for numerical stability (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsBatchNormInference()

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.

Parameters
argsAn arguments object type (output)
bnOpBatch normalization inference operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
bnScalePointer to the gamma tensor memory (input)
bnBiasPointer to the beta tensor memory (input)
estimatedMeanPointer to population mean memory (input)
estimatedVariancePointer to population variance memory (input)
epsilonScalar value for numerical stability (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsBiasForward()

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.

Parameters
argsAn arguments object type (output)
biasOpForward bias operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
biasPointer to the forward bias input tensor memory (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.

◆ miopenSetOpArgsConvForward()

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.

Parameters
argsAn arguments object type (output)
convOpForward convolution operator (input)
alphaFloating point scaling factor, allocated on the host (input)
betaFloating point shift factor, allocated on the host (input)
wPointer to tensor memory (input)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.0/include/miopen/miopen.h.