CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round > Class Template Reference

#include <linear_combination_relu.h>

Classes

struct  Params
 Host-constructable parameters structure. More...
 

Public Types

using ElementOutput = ElementOutput_
 
using ElementAccumulator = ElementAccumulator_
 
using ElementCompute = ElementCompute_
 
using FragmentOutput = Array< ElementOutput, kCount >
 
using FragmentAccumulator = Array< ElementAccumulator, kCount >
 
using ComputeFragment = Array< ElementCompute, kCount >
 

Public Member Functions

CUTLASS_HOST_DEVICE LinearCombinationRelu (Params const &params)
 Constructs the function object, possibly loading from pointers in host memory. More...
 
CUTLASS_HOST_DEVICE bool is_source_needed () const
 Returns true if source is needed. More...
 
CUTLASS_HOST_DEVICE void set_k_partition (int k_partition)
 Functionally required for serial reduction in the epilogue. More...
 
CUTLASS_HOST_DEVICE FragmentOutput operator() (FragmentAccumulator const &accumulator, FragmentOutput const &source, ElementCompute uniform=ElementCompute(0)) const
 Computes linear scaling: D = alpha * accumulator + beta * source. More...
 

Static Public Attributes

static int const kCount = Count
 
static FloatRoundStyle const kRound = Round
 

Detailed Description

template<typename ElementOutput_, int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
class cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >

Applies a linear combination operator to an array of elements then clamps the output before converting to the output element type.

D = alpha * accumulator + beta * source + uniform

Member Typedef Documentation

template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::ComputeFragment = Array<ElementCompute, kCount>
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::ElementAccumulator = ElementAccumulator_
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::ElementCompute = ElementCompute_
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::ElementOutput = ElementOutput_
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::FragmentAccumulator = Array<ElementAccumulator, kCount>
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
using cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::FragmentOutput = Array<ElementOutput, kCount>

Constructor & Destructor Documentation

template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
CUTLASS_HOST_DEVICE cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::LinearCombinationRelu ( Params const &  params)
inline

Member Function Documentation

template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
CUTLASS_HOST_DEVICE bool cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::is_source_needed ( ) const
inline
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
CUTLASS_HOST_DEVICE FragmentOutput cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::operator() ( FragmentAccumulator const &  accumulator,
FragmentOutput const &  source,
ElementCompute  uniform = ElementCompute(0) 
) const
inline
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
CUTLASS_HOST_DEVICE void cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::set_k_partition ( int  k_partition)
inline

Member Data Documentation

template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
int const cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::kCount = Count
static
template<typename ElementOutput_ , int Count, typename ElementAccumulator_ = ElementOutput_, typename ElementCompute_ = ElementOutput_, FloatRoundStyle Round = FloatRoundStyle::round_to_nearest>
FloatRoundStyle const cutlass::epilogue::thread::LinearCombinationRelu< ElementOutput_, Count, ElementAccumulator_, ElementCompute_, Round >::kRound = Round
static

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