Sum

Sum#

MIOpen: Sum

Enumerations

enum  miopenSumNanPropagation_t {
  MIOPEN_SUM_NOT_PROPAGATE_NAN = 0 ,
  MIOPEN_SUM_PROPAGATE_NAN = 1
}
 

Functions

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

Detailed Description

Enumeration Type Documentation

◆ miopenSumNanPropagation_t

Nan numbers propagation modes for sum

Enumerator
MIOPEN_SUM_NOT_PROPAGATE_NAN 

does not propagate Nan number

MIOPEN_SUM_PROPAGATE_NAN 

propagate the Nan number by the Reduction operation

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

Function Documentation

◆ miopenGetSumWorkspaceSize()

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.

Parameters
handleMIOpen Handle (input)
xDescTensor descriptor for data input tensor x (input)
dimDimension to sum. (input)
yDescTensor descriptor for output data tensor y (input)
sizeInBytesPointer to data to return the minimum workspace size
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.2/include/miopen/miopen.h.

◆ miopenSumForward()

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.

Parameters
handleMIOpen handle (input)
nanPropagationNan number propagation mode (input)
workspaceAddress of the allocated workspace data (input)
workspaceSizeInBytesSize in bytes of the allocated workspace data (input)
xDescTensor descriptor for data input tensor x (input)
xData tensor x (input)
dimDimension to sum. (input)
yDescTensor descriptor for output data tensor y (input)
yData tensor y (output)
Returns
miopenStatus_t
Examples
/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-miopen/checkouts/docs-6.2.2/include/miopen/miopen.h.