/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-6.4.3/include/ck/tensor_operation/gpu/device/impl/device_reduce_threadwise.hpp Source File#
device_reduce_threadwise.hpp
Go to the documentation of this file.
383 str << "InSrcVectorDim_" << InSrcVectorDim << "_InSrcVectorSize_" << InSrcVectorSize << "_OutDstVectorSize_" << OutDstVectorSize << ">";
float launch_and_time_kernel(const StreamConfig &stream_config, F kernel, dim3 grid_dim, dim3 block_dim, std::size_t lds_byte, Args... args)
Definition: kernel_launch.hpp:13
__host__ constexpr __device__ auto integer_least_multiple(X x, Y y)
Definition: math.hpp:78
Definition: ck.hpp:264
__host__ constexpr __device__ auto make_naive_tensor_descriptor(const Tuple< Lengths... > &lengths, const Tuple< Strides... > &strides)
Definition: tensor_descriptor_helper.hpp:49
__host__ constexpr __device__ auto generate_tuple(F &&f, Number< N >)
Definition: tuple_helper.hpp:15
__host__ constexpr __device__ auto make_merge_transform(const LowLengths &low_lengths)
Definition: multi_index_transform_helper.hpp:55
__global__ void kernel_reduce_threadwise(const InGridDesc_M_K in_grid_desc_m_k, const OutGridDesc_M out_grid_desc_m, const InElementwiseOperation in_elementwise_op, const AccElementwiseOperation acc_elementwise_op, AccDataType alpha, const InDataType *const __restrict__ p_in_value_global, const IndexDataType *const __restrict__ p_in_index_global, AccDataType beta, OutDataType *const __restrict__ p_out_value_global, IndexDataType *const __restrict__ p_out_index_global)
Definition: gridwise_2d_reduction_threadwise.hpp:28
__host__ constexpr __device__ auto make_unmerge_transform(const UpLengths &up_lengths, integral_constant< bool, Use24BitIntegerCalculation >=integral_constant< bool, false >{})
Definition: multi_index_transform_helper.hpp:90
__host__ constexpr __device__ auto transform_tensor_descriptor(const OldTensorDescriptor &old_tensor_desc, const NewTransforms &new_transforms, NewLowerDimensionOldVisibleIdss, NewUpperDimensionNewVisibleIdss)
Definition: tensor_descriptor.hpp:319
__host__ constexpr __device__ auto make_right_pad_transform(const LowLength &low_length, const RightPadLength &right_pad, integral_constant< bool, SkipIsValidCheck >=integral_constant< bool, false >{})
Definition: multi_index_transform_helper.hpp:37
Definition: stream_config.hpp:10
Definition: gridwise_2d_reduction_threadwise.hpp:84
Definition: sequence.hpp:43
typename conditional< kHasContent, type0, type1 >::type type
Definition: sequence.hpp:256
Definition: integral_constant.hpp:10
Definition: device_base.hpp:50
Definition: device_base.hpp:61
Definition: device_reduce.hpp:27
Definition: device_reduce_threadwise.hpp:162
std::array< index_t, Rank > inLengths_
Definition: device_reduce_threadwise.hpp:205
std::array< index_t, NumDstDim > outStrides_
Definition: device_reduce_threadwise.hpp:208
InElementwiseOperation in_elementwise_op_
Definition: device_reduce_threadwise.hpp:217
int numBlockTileIteration
Definition: device_reduce_threadwise.hpp:225
IndexDataType * out_index_dev_
Definition: device_reduce_threadwise.hpp:215
index_t invariant_lowest_length
Definition: device_reduce_threadwise.hpp:220
OutDataType * out_dev_
Definition: device_reduce_threadwise.hpp:214
AccDataType alpha_
Definition: device_reduce_threadwise.hpp:210
size_t gridSize
Definition: device_reduce_threadwise.hpp:226
AccDataType beta_
Definition: device_reduce_threadwise.hpp:211
AccElementwiseOperation acc_elementwise_op_
Definition: device_reduce_threadwise.hpp:218
std::array< index_t, Rank > inStrides_
Definition: device_reduce_threadwise.hpp:206
std::array< index_t, NumDstDim > outLengths_
Definition: device_reduce_threadwise.hpp:207
index_t reduce_lowest_length
Definition: device_reduce_threadwise.hpp:221
long_index_t invariant_total_length
Definition: device_reduce_threadwise.hpp:222
long_index_t reduce_total_length
Definition: device_reduce_threadwise.hpp:223
Argument(const std::array< index_t, Rank > inLengths, const std::array< index_t, Rank > inStrides, const std::array< index_t, NumDstDim > outLengths, const std::array< index_t, NumDstDim > outStrides, const std::array< int, NumReduceDim > reduceDims, double alpha, double beta, const InDataType *in_dev, OutDataType *out_dev, IndexDataType *out_index_dev, const InElementwiseOperation in_elementwise_op, const AccElementwiseOperation acc_elementwise_op)
Definition: device_reduce_threadwise.hpp:163
const InDataType * in_dev_
Definition: device_reduce_threadwise.hpp:213
Definition: device_reduce_threadwise.hpp:230
float Run(const BaseArgument *p_arg, const StreamConfig &stream_config=StreamConfig{}) override
Definition: device_reduce_threadwise.hpp:293
float Run(const Argument &arg, const StreamConfig &stream_config=StreamConfig{})
Definition: device_reduce_threadwise.hpp:231
Definition: device_reduce_threadwise.hpp:49
static constexpr index_t NumSrcDim
Definition: device_reduce_threadwise.hpp:63
int32_t IndexDataType
Definition: device_reduce_threadwise.hpp:57
static constexpr index_t NumDstDim
Definition: device_reduce_threadwise.hpp:64
bool IsSupportedArgument(const BaseArgument *p_arg) override
Definition: device_reduce_threadwise.hpp:300
std::string GetTypeString() const override
Definition: device_reduce_threadwise.hpp:375
static constexpr index_t NumInvariantDim
Definition: device_reduce_threadwise.hpp:61
static constexpr index_t M_BlockTileSize
Definition: device_reduce_threadwise.hpp:67
static constexpr bool reduceAllDim
Definition: device_reduce_threadwise.hpp:65
std::unique_ptr< BaseInvoker > MakeInvokerPointer() override
Definition: device_reduce_threadwise.hpp:370
static constexpr bool HaveIndexInput
Definition: device_reduce_threadwise.hpp:59
static constexpr index_t K_BlockTileSize
Definition: device_reduce_threadwise.hpp:68
static auto MakeSrc2dDescriptor(const std::array< index_t, Rank > &inLengths, const std::array< index_t, Rank > &inStrides)
Definition: device_reduce_threadwise.hpp:70
std::unique_ptr< BaseArgument > MakeArgumentPointer(const std::array< index_t, Rank > inLengths, const std::array< index_t, Rank > inStrides, const std::array< index_t, NumDstDim > outLengths, const std::array< index_t, NumDstDim > outStrides, const std::array< int, NumReduceDim > reduceDims, double alpha, double beta, const void *in_dev, const void *in_index_dev, void *out_dev, void *out_index_dev, const InElementwiseOperation in_elementwise_op, const AccElementwiseOperation acc_elementwise_op) override
Definition: device_reduce_threadwise.hpp:340
static auto MakeDst1dDescriptor(const std::array< index_t, NumDstDim > &outLengths, const std::array< index_t, NumDstDim > &outStrides)
Definition: device_reduce_threadwise.hpp:132