DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford > Struct Template Reference

DeviceNormalizationFwdImpl&lt; XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford &gt; Struct Template Reference#

Composable Kernel: ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford > Struct Template Reference
ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford > Struct Template Reference

#include <device_normalization_fwd_impl.hpp>

Inheritance diagram for ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >:
ck::tensor_operation::device::DeviceNormalizationFwd< XDataType, GammaDataType, BetaDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim > ck::tensor_operation::device::BaseOperator

Classes

struct  Argument
struct  Invoker

Public Types

using PassThrough = tensor_operation::element_wise::PassThrough
using GridDesc_M_K = decltype(MakeSrc2dDescriptor({1}, {1}, 1))
using GridDesc_M = decltype(MakeSaveMeanInvStdDescriptor_M({1}, {1}))

Public Member Functions

bool IsSupportedArgument (const BaseArgument *p_arg) override
std::unique_ptr< BaseArgumentMakeArgumentPointer (const std::vector< index_t > lengths, const std::vector< index_t > xStrides, const std::vector< index_t > gammaStrides, const std::vector< index_t > betaStrides, const std::vector< index_t > yStrides, const std::vector< index_t > saveMeanStrides, const std::vector< index_t > saveInvStdStrides, const std::vector< index_t > reduceDims, double epsilon, const void *p_x, const void *p_gamma, const void *p_beta, void *p_y, void *p_saveMean, void *p_saveInvStd, YElementwiseOperation y_elementwise_op) override
std::unique_ptr< BaseInvokerMakeInvokerPointer () override
std::string GetTypeString () const override
Public Member Functions inherited from ck::tensor_operation::device::BaseOperator
 BaseOperator ()=default
 BaseOperator (const BaseOperator &)=default
BaseOperatoroperator= (const BaseOperator &)=default
virtual std::string GetInstanceString () const
virtual std::string GetTypeIdName () const
virtual std::optional< std::string > GetObjectName () const
virtual std::optional< std::string > GetTemplateInfo () const
virtual std::string GetTypeIdHashCode () const
virtual size_t GetWorkSpaceSize (const BaseArgument *) const
virtual void SetWorkSpacePointer (BaseArgument *p_arg, void *p_workspace, const StreamConfig &=StreamConfig{}) const
virtual ~BaseOperator ()

Static Public Member Functions

static auto MakeSrc2dDescriptor (const std::vector< index_t > &inLengths, const std::vector< index_t > &inStrides, int numBlockTileIteration)
static auto MakeSaveMeanInvStdDescriptor_M (const std::vector< index_t > &lengths, const std::vector< index_t > &strides)

Static Public Attributes

static constexpr index_t NumInvariantDim = Rank - NumReduceDim
static constexpr index_t M_BlockTileSize = MThreadClusterSize * MThreadSliceSize
static constexpr index_t K_BlockTileSize = KThreadClusterSize * KThreadSliceSize
static constexpr bool reduceAllDim = (NumInvariantDim == 0)

Member Typedef Documentation

◆ GridDesc_M

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
using ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::GridDesc_M = decltype(MakeSaveMeanInvStdDescriptor_M({1}, {1}))

◆ GridDesc_M_K

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
using ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::GridDesc_M_K = decltype(MakeSrc2dDescriptor({1}, {1}, 1))

◆ PassThrough

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
using ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::PassThrough = tensor_operation::element_wise::PassThrough

Member Function Documentation

◆ GetTypeString()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
std::string ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::GetTypeString ( ) const
inlineoverridevirtual

◆ IsSupportedArgument()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
bool ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::IsSupportedArgument ( const BaseArgument * p_arg)
inlineoverridevirtual

◆ MakeArgumentPointer()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
std::unique_ptr< BaseArgument > ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::MakeArgumentPointer ( const std::vector< index_t > lengths,
const std::vector< index_t > xStrides,
const std::vector< index_t > gammaStrides,
const std::vector< index_t > betaStrides,
const std::vector< index_t > yStrides,
const std::vector< index_t > saveMeanStrides,
const std::vector< index_t > saveInvStdStrides,
const std::vector< index_t > reduceDims,
double epsilon,
const void * p_x,
const void * p_gamma,
const void * p_beta,
void * p_y,
void * p_saveMean,
void * p_saveInvStd,
YElementwiseOperation y_elementwise_op )
inlineoverridevirtual

◆ MakeInvokerPointer()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
std::unique_ptr< BaseInvoker > ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::MakeInvokerPointer ( )
inlineoverridevirtual

◆ MakeSaveMeanInvStdDescriptor_M()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
auto ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::MakeSaveMeanInvStdDescriptor_M ( const std::vector< index_t > & lengths,
const std::vector< index_t > & strides )
inlinestatic

◆ MakeSrc2dDescriptor()

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
auto ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::MakeSrc2dDescriptor ( const std::vector< index_t > & inLengths,
const std::vector< index_t > & inStrides,
int numBlockTileIteration )
inlinestatic

Member Data Documentation

◆ K_BlockTileSize

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
index_t ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::K_BlockTileSize = KThreadClusterSize * KThreadSliceSize
staticconstexpr

◆ M_BlockTileSize

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
index_t ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::M_BlockTileSize = MThreadClusterSize * MThreadSliceSize
staticconstexpr

◆ NumInvariantDim

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
index_t ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::NumInvariantDim = Rank - NumReduceDim
staticconstexpr

◆ reduceAllDim

template<typename XDataType, typename GammaDataType, typename BetaDataType, typename ComputeDataType, typename YDataType, typename SaveMeanInvStdDataType, typename YElementwiseOperation, index_t Rank, index_t NumReduceDim, index_t BlockSize, index_t MThreadClusterSize, index_t KThreadClusterSize, index_t MThreadSliceSize, index_t KThreadSliceSize, index_t XYSrcVectorDim, index_t XSrcVectorSize, index_t GammaSrcVectorDim, index_t GammaSrcVectorSize, index_t BetaSrcVectorDim, index_t BetaSrcVectorSize, index_t YDstVectorSize, index_t SaveMeanInvStdDstVectorSize, bool UseWelford = true>
bool ck::tensor_operation::device::DeviceNormalizationFwdImpl< XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType, SaveMeanInvStdDataType, YElementwiseOperation, Rank, NumReduceDim, BlockSize, MThreadClusterSize, KThreadClusterSize, MThreadSliceSize, KThreadSliceSize, XYSrcVectorDim, XSrcVectorSize, GammaSrcVectorDim, GammaSrcVectorSize, BetaSrcVectorDim, BetaSrcVectorSize, YDstVectorSize, SaveMeanInvStdDstVectorSize, UseWelford >::reduceAllDim = (NumInvariantDim == 0)
staticconstexpr

The documentation for this struct was generated from the following file: