Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tc::MappingOptions Class Reference

#include <mapping_options.h>

Collaboration diagram for tc::MappingOptions:

Public Member Functions

 MappingOptions (const MappingOptions &options)
 Construct a deep copy of the options. More...
 
 MappingOptions (const MappingOptionsProto &buf)
 
 MappingOptions (const std::string &str)
 Construct from a serialized protocol buffer message. More...
 
MappingOptionsoperator= (const MappingOptions &)=default
 Assign from another message. More...
 
bool operator== (const MappingOptions &options) const
 Compare with another message. More...
 
bool operator!= (const MappingOptions &options) const
 
std::string toProtobufSerializedString () const
 Get a string with a serialized protocol buffers message. More...
 
Chainable Modifiers

See protobuf for documentation on each option.

MappingOptionstile (const std::vector< uint64_t > &sizes)
 
MappingOptionstile (std::initializer_list< uint64_t > sizes)
 
MappingOptionstile (const std::string &commaSeparatedSizes)
 
MappingOptionstile (const char *commaSeparatedSizes)
 
template<typename... Args>
MappingOptionstile (Args...)
 
MappingOptionsmapToThreads (std::initializer_list< uint64_t > threads)
 
MappingOptionsmapToThreads (uint64_t x, uint64_t y=CudaDimView::defaultDim, uint64_t z=CudaDimView::defaultDim)
 
MappingOptionsmapToThreads (const std::vector< uint64_t > &threads)
 
MappingOptionsmapToThreads (const std::string &commaSeparatedSizes)
 
MappingOptionsmapToBlocks (std::initializer_list< uint64_t > blocks)
 
MappingOptionsmapToBlocks (uint64_t x, uint64_t y=CudaDimView::defaultDim, uint64_t z=CudaDimView::defaultDim)
 
MappingOptionsmapToBlocks (const std::vector< uint64_t > &blocks)
 
MappingOptionsmapToBlocks (const std::string &commaSeparatedSizes)
 
MappingOptionsunroll (uint64_t size)
 
MappingOptionsuseSharedMemory (bool b)
 
MappingOptionsusePrivateMemory (bool b)
 
MappingOptionsmaxSharedMemory (uint64_t size)
 
MappingOptionsfixParametersBeforeScheduling (bool b)
 
MappingOptionsunrollCopyShared (bool b)
 
MappingOptionstileImperfectlyNested (bool b)
 
MappingOptionsmatchLibraryCalls (bool b)
 
MappingOptionsscheduleFusionStrategy (FusionStrategy fs)
 
MappingOptionsscheduleFusionStrategy (const std::string &str)
 
MappingOptionsouterScheduleFusionStrategy (FusionStrategy fs)
 
MappingOptionsouterScheduleFusionStrategy (const std::string &str)
 
MappingOptionsouterScheduleAllowSkewing (bool b)
 
MappingOptionsouterSchedulePositiveOrthant (bool b)
 
MappingOptionsintraTileScheduleFusionStrategy (FusionStrategy fs)
 
MappingOptionsintraTileScheduleFusionStrategy (const std::string &str)
 
MappingOptionsintraTileScheduleAllowSkewing (bool b)
 
MappingOptionsintraTileSchedulePositiveOrthant (bool b)
 

Static Public Member Functions

static MappingOptions makeNaiveMappingOptions ()
 
static MappingOptions makeSingleThreadMappingOptions ()
 
static MappingOptions makePointwiseMappingOptions ()
 
static MappingOptions makeMlpMappingOptions ()
 
static MappingOptions makeConvolutionMappingOptions ()
 
static MappingOptions makeGroupConvolutionMappingOptions ()
 

Public Attributes

MappingOptionsProto proto
 
CudaDimView block
 
CudaDimView grid
 
TilingView tiling
 
SchedulerOptionsView outerScheduleOptions
 
SchedulerOptionsView intraTileScheduleOptions
 

Private Member Functions

 MappingOptions ()
 

Static Private Member Functions

static MappingOptions makeUnmappedMappingOptions ()
 

Friends

std::ostream & operator<< (std::ostream &os, const MappingOptions &options)
 Output operator. More...
 

Detailed Description

Top-level interface to MappingOptionsProto.

Contains views of the sub-messages (scheduler options, tiling, grid and block sizes). Provides static constructors for common operator options. Provides fluent (chainable) API for progressively modifying the options.

Constructor & Destructor Documentation

tc::MappingOptions::MappingOptions ( )
inlineprivate
tc::MappingOptions::MappingOptions ( const MappingOptions options)
inline

Construct a deep copy of the options.

tc::MappingOptions::MappingOptions ( const MappingOptionsProto &  buf)
inlineexplicit
tc::MappingOptions::MappingOptions ( const std::string &  str)
inlineexplicit

Construct from a serialized protocol buffer message.

Member Function Documentation

MappingOptions & tc::MappingOptions::fixParametersBeforeScheduling ( bool  b)
inline
MappingOptions & tc::MappingOptions::intraTileScheduleAllowSkewing ( bool  b)
inline

Set fusion strategy for intra-tile scheduling.

MappingOptions & tc::MappingOptions::intraTileScheduleFusionStrategy ( FusionStrategy  fs)
inline

Set fusion strategy for intra-tile scheduling.

MappingOptions & tc::MappingOptions::intraTileScheduleFusionStrategy ( const std::string &  str)
inline

Set fusion strategy for intra-tile scheduling.

MappingOptions & tc::MappingOptions::intraTileSchedulePositiveOrthant ( bool  b)
inline

Set fusion strategy for intra-tile scheduling.

static MappingOptions tc::MappingOptions::makeConvolutionMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makeGroupConvolutionMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makeMlpMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makeNaiveMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makePointwiseMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makeSingleThreadMappingOptions ( )
static

Static constructors for predefined strategies.

static MappingOptions tc::MappingOptions::makeUnmappedMappingOptions ( )
staticprivate
MappingOptions & tc::MappingOptions::mapToBlocks ( std::initializer_list< uint64_t >  blocks)
inline
MappingOptions & tc::MappingOptions::mapToBlocks ( uint64_t  x,
uint64_t  y = CudaDimView::defaultDim,
uint64_t  z = CudaDimView::defaultDim 
)
inline
MappingOptions & tc::MappingOptions::mapToBlocks ( const std::vector< uint64_t > &  blocks)
inline
MappingOptions& tc::MappingOptions::mapToBlocks ( const std::string &  commaSeparatedSizes)
MappingOptions & tc::MappingOptions::mapToThreads ( std::initializer_list< uint64_t >  threads)
inline
MappingOptions & tc::MappingOptions::mapToThreads ( uint64_t  x,
uint64_t  y = CudaDimView::defaultDim,
uint64_t  z = CudaDimView::defaultDim 
)
inline
MappingOptions & tc::MappingOptions::mapToThreads ( const std::vector< uint64_t > &  threads)
inline
MappingOptions& tc::MappingOptions::mapToThreads ( const std::string &  commaSeparatedSizes)
MappingOptions & tc::MappingOptions::matchLibraryCalls ( bool  b)
inline
MappingOptions & tc::MappingOptions::maxSharedMemory ( uint64_t  size)
inline
bool tc::MappingOptions::operator!= ( const MappingOptions options) const
inline
MappingOptions& tc::MappingOptions::operator= ( const MappingOptions )
default

Assign from another message.

bool tc::MappingOptions::operator== ( const MappingOptions options) const
inline

Compare with another message.

MappingOptions & tc::MappingOptions::outerScheduleAllowSkewing ( bool  b)
inline

Set fusion strategy for outer scheduling.

MappingOptions & tc::MappingOptions::outerScheduleFusionStrategy ( FusionStrategy  fs)
inline

Set fusion strategy for outer scheduling.

MappingOptions & tc::MappingOptions::outerScheduleFusionStrategy ( const std::string &  str)
inline

Set fusion strategy for outer scheduling.

MappingOptions & tc::MappingOptions::outerSchedulePositiveOrthant ( bool  b)
inline

Set fusion strategy for outer scheduling.

MappingOptions & tc::MappingOptions::scheduleFusionStrategy ( FusionStrategy  fs)
inline

Set single fusion strategy.

MappingOptions & tc::MappingOptions::scheduleFusionStrategy ( const std::string &  str)
inline

Set single fusion strategy.

MappingOptions & tc::MappingOptions::tile ( const std::vector< uint64_t > &  sizes)
inline
MappingOptions & tc::MappingOptions::tile ( std::initializer_list< uint64_t >  sizes)
inline
MappingOptions& tc::MappingOptions::tile ( const std::string &  commaSeparatedSizes)
MappingOptions & tc::MappingOptions::tile ( const char *  commaSeparatedSizes)
inline
template<typename... Args>
MappingOptions & tc::MappingOptions::tile ( Args...  args)
MappingOptions & tc::MappingOptions::tileImperfectlyNested ( bool  b)
inline
std::string tc::MappingOptions::toProtobufSerializedString ( ) const
inline

Get a string with a serialized protocol buffers message.

MappingOptions & tc::MappingOptions::unroll ( uint64_t  size)
inline
MappingOptions & tc::MappingOptions::unrollCopyShared ( bool  b)
inline
MappingOptions & tc::MappingOptions::usePrivateMemory ( bool  b)
inline
MappingOptions & tc::MappingOptions::useSharedMemory ( bool  b)
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MappingOptions options 
)
friend

Output operator.

Member Data Documentation

CudaDimView tc::MappingOptions::block
CudaDimView tc::MappingOptions::grid
SchedulerOptionsView tc::MappingOptions::intraTileScheduleOptions
SchedulerOptionsView tc::MappingOptions::outerScheduleOptions
MappingOptionsProto tc::MappingOptions::proto
TilingView tc::MappingOptions::tiling

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