CGRA-ME
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
BothSmallTimeThenHeurFullTime Struct Reference
Inheritance diagram for BothSmallTimeThenHeurFullTime:
Mapper

Public Types

enum  ILPMapperAnalysisResult { ILPMapperAnalysisResult::return_mapping, ILPMapperAnalysisResult::advance_seed, ILPMapperAnalysisResult::ignore_mapping }
 

Public Member Functions

 BothSmallTimeThenHeurFullTime (std::shared_ptr< CGRA > cgra, int timelimit, const ConfigStore &args)
 
 BothSmallTimeThenHeurFullTime (std::shared_ptr< CGRA > cgra, int timelimit, ConfigStore untouched_args, ConfigStore args)
 
template<typename T >
void printStatus (const T &msg) const
 
Mapping mapOpGraph (std::shared_ptr< OpGraph > opgraph, int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port) override
 
Mapping mapOpGraph_internal (std::shared_ptr< OpGraph > opgraph, int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port) const
 
- Public Member Functions inherited from Mapper
virtual ~Mapper ()
 

Static Public Member Functions

static ILPMapperAnalysisResult analyzeILPMapping (const Mapping &ilp_mapping, const MRRG &mrrg)
 
static bool mappingIsOK (const Mapping &mapping, const MRRG &mrrg)
 Checks latency balancing. Only needed for the ILP mapper. More...
 

Public Attributes

ConfigStore untouched_args
 
ConfigStore args
 

Static Public Attributes

static AutoRegisterMapper arm
 
static constexpr const char * mapper_name = "BothSmallTimeThenHeurFullTime"
 

Additional Inherited Members

- Protected Member Functions inherited from Mapper
 Mapper (std::shared_ptr< CGRA > cgra, int timelimit)
 
- Protected Attributes inherited from Mapper
std::shared_ptr< CGRAcgra
 
int timelimit
 

Detailed Description

Definition at line 5 of file CompositeMappers.cpp.

Member Enumeration Documentation

◆ ILPMapperAnalysisResult

Enumerator
return_mapping 
advance_seed 
ignore_mapping 

Definition at line 129 of file CompositeMappers.cpp.

Constructor & Destructor Documentation

◆ BothSmallTimeThenHeurFullTime() [1/2]

BothSmallTimeThenHeurFullTime::BothSmallTimeThenHeurFullTime ( std::shared_ptr< CGRA cgra,
int  timelimit,
const ConfigStore args 
)
inline

Constructor called from registrar

Definition at line 15 of file CompositeMappers.cpp.

◆ BothSmallTimeThenHeurFullTime() [2/2]

BothSmallTimeThenHeurFullTime::BothSmallTimeThenHeurFullTime ( std::shared_ptr< CGRA cgra,
int  timelimit,
ConfigStore  untouched_args,
ConfigStore  args 
)
inline

Should be called with pre-processed args

Definition at line 22 of file CompositeMappers.cpp.

Member Function Documentation

◆ analyzeILPMapping()

static ILPMapperAnalysisResult BothSmallTimeThenHeurFullTime::analyzeILPMapping ( const Mapping ilp_mapping,
const MRRG mrrg 
)
inlinestatic

Definition at line 135 of file CompositeMappers.cpp.

◆ mapOpGraph()

Mapping BothSmallTimeThenHeurFullTime::mapOpGraph ( std::shared_ptr< OpGraph opgraph,
int  II,
const MRRG mrrg,
std::unordered_map< std::string, std::string >  fix_port 
)
inlineoverridevirtual

Implements Mapper.

Definition at line 35 of file CompositeMappers.cpp.

◆ mapOpGraph_internal()

Mapping BothSmallTimeThenHeurFullTime::mapOpGraph_internal ( std::shared_ptr< OpGraph opgraph,
int  II,
const MRRG mrrg,
std::unordered_map< std::string, std::string >  fix_port 
) const
inline

Definition at line 39 of file CompositeMappers.cpp.

◆ mappingIsOK()

static bool BothSmallTimeThenHeurFullTime::mappingIsOK ( const Mapping mapping,
const MRRG mrrg 
)
inlinestatic

Checks latency balancing. Only needed for the ILP mapper.

Definition at line 154 of file CompositeMappers.cpp.

◆ printStatus()

template<typename T >
void BothSmallTimeThenHeurFullTime::printStatus ( const T &  msg) const
inline

Definition at line 29 of file CompositeMappers.cpp.

Member Data Documentation

◆ args

ConfigStore BothSmallTimeThenHeurFullTime::args

Definition at line 10 of file CompositeMappers.cpp.

◆ arm

AutoRegisterMapper BothSmallTimeThenHeurFullTime::arm
static
Initial value:
[](std::shared_ptr<CGRA> cgra, int timelimit, const ConfigStore& args) {
return std::make_unique<BothSmallTimeThenHeurFullTime>(cgra, timelimit, args);
},
true,
"In parallel, runs both ILPHeuristicMapper and ILPMapper with a short timeout, "
"then ILPHeuristicMapper with the full timeout while running ILPMapper with a capped timeout. "
"Any successful & correct mapping is returned",
{
{"seed", 0, ""},
{"verbosity", 0, ""},
{"max_threads", 2, ""},
{"initial_timeout", 25, "Max time of the first iteration"},
{"initial_heur_wait", 10,
"The first run of ILPHeuristicMapper will be launched this many seconds after ILPMapper\n"
"The point is to try to avoid the cache warm-up if possible, as that takes a while, and isn't included in the timeout."
"(cache warm-up can easily take tens of seconds)"
},
{"secondary_limit", 3*60, "Time limit applied to second run of ILPMapper"},
},
{
}
)

Definition at line 6 of file CompositeMappers.cpp.

◆ mapper_name

constexpr const char* BothSmallTimeThenHeurFullTime::mapper_name = "BothSmallTimeThenHeurFullTime"
staticconstexpr

Definition at line 7 of file CompositeMappers.cpp.

◆ untouched_args

ConfigStore BothSmallTimeThenHeurFullTime::untouched_args

Definition at line 9 of file CompositeMappers.cpp.


The documentation for this struct was generated from the following file:
BothSmallTimeThenHeurFullTime::args
ConfigStore args
Definition: CompositeMappers.cpp:10
AutoRegisterMapper
Special helper for registering mappers to the default mapper registry.
Definition: Mapper.h:200
ConfigStore
Definition: ConfigStore.h:76
BothSmallTimeThenHeurFullTime::mapper_name
static constexpr const char * mapper_name
Definition: CompositeMappers.cpp:7
Mapper::cgra
std::shared_ptr< CGRA > cgra
Definition: Mapper.h:45
Mapper::timelimit
int timelimit
Definition: Mapper.h:46