Go to the documentation of this file.
11 #ifndef ___HEURISTICMAPPERS_H__
12 #define ___HEURISTICMAPPERS_H__
36 using FUCoster = std::function<double(
93 {
"allow_multiple_op_mappings",
false},
94 {
"allow_unbalanced_latency",
false},
95 {
"add_self_as_neighbour_if_path",
true},
96 {
"path_exclusivity_modelling",
true},
97 {
"path_exclusivity_constraints_are_pairwise",
true},
98 {
"max_num_paths_between_FUs", 20},
99 {
"map_unmapped_ops",
true},
100 {
"solve_approach_name",
"ILP-Heuristic-Mapper"},
101 {
"status_print_interval", 100},
102 {
"allowable_routing_usage_multiplier", 1},
103 {
"operand_nodes_are_normal",
false},
105 {
"max_solutions",
"2000000000"},
108 {
"print_configuration_and_statistics",
false},
109 {
"print_initial_mapping",
false},
110 {
"print_intermediate_mappings",
false},
111 {
"print_intermediate_mappings_placement_only",
false},
112 {
"print_mapping",
false},
113 {
"print_solve_progress",
false},
114 {
"print_compatible_nodes",
false},
115 {
"print_neighbours",
false},
116 {
"print_paths",
false},
117 {
"silence_warnings",
false},
118 {
"model_dump_filename",
""},
119 {
"model_IIS_dump_filename",
""},
120 {
"intermediate_solution_dump_filename_base",
""},
122 {
"just_warm_up_caches",
false},
124 return general_defaults;
137 std::unordered_map<std::string, std::string> fix_port,
139 const Mapping& initial_mapping,
151 Mapping initial_mapping =
Mapping{std::make_shared<CGRA>(), -1, std::make_shared<OpGraph>()}
160 std::unordered_map<std::string, std::string> fix_port,
170 Mapping mapOpGraph(std::shared_ptr<OpGraph> opgraph,
int II,
const MRRG& mrrg, std::unordered_map<std::string, std::string>fix_port)
override
173 Mapping real_mapOpGraph(std::shared_ptr<OpGraph> opgraph,
int II,
const MRRG& mrrg, std::unordered_map<std::string, std::string>fix_port)
const;
OpNodeFilter is_node_allowed_for_op
std::function< bool(const OpGraph::OpDescriptor &op, const MRRG::NodeDescriptor &node)> OpNodeFilter
ConfigStore outer_options
Mapping routeOpMappingByChoosingPaths(std::unordered_map< std::string, std::string > fix_port, const Mapping &op_mapping, const OpGraph &opgraph, const MRRG &mrrg, RouteOpMappingByChoosingPathsOptions options={ {}, acceptTheFirstSolution, {} }, ILPHeuristicMapperCaches caches={})
static ILPHeuristicMapperOptions & add_defaults(ILPHeuristicMapperOptions &options)
ILPHeuristicMapper(std::shared_ptr< CGRA > cgra, int timelimit, const ConfigStore &args)
NeighbourFinder find_all_neighbour_FUs
static SolverID GoogleORTools_ClassicCP
const SolutionSelector acceptTheFirstSolution
Common interface for mappers.
ConfigStore final_combined_attempt_options
std::function< double(const OpGraph &opgraph, const MRRG &mrrg, const OpGraph::OpDescriptor &op, const MRRG::NodeDescriptor &node)> FUCoster
ConfigStore inner_options
std::function< FunctionalUnitNeighbours(const MRRG &, const std::vector< MRRG::NodeDescriptor > &)> NeighbourFinder
ConfigStore & add_all(ConfigStore &into, const ConfigStore &from)
Add (or set) all keys from from in into.
static const ConfigStore & default_general_opts()
NodeFilter is_node_allowed
std::function< Mapping(const Mapping &)> SolutionSelector
friend std::ostream & operator<<(std::ostream &os, const ILPHeuristicMapperOptions &opts)
ConfigStore general_options
const OpNodeFilter allowAllNodesForOps
ILPHeuristicMapperOptions()=delete
std::shared_ptr< CGRA > cgra
Mapping mapOpGraph(std::shared_ptr< OpGraph > opgraph, int II, const MRRG &mrrg, std::unordered_map< std::string, std::string >fix_port) override
Mapping mapOpsJustByConnectivity(std::unordered_map< std::string, std::string > fix_port, const OpGraph &opgraph, const MRRG &mrrg, ILPHeuristicMapperOptions options, ILPHeuristicMapperCaches caches={}, Mapping initial_mapping=Mapping{std::make_shared< CGRA >(), -1, std::make_shared< OpGraph >()})
const EdgeCoster noEdgeCosting
Mapping mapViaConnectivityAndPathChoosing(std::unordered_map< std::string, std::string > fix_port, const OpGraph &opgraph, const MRRG &mrrg, const Mapping &initial_mapping, ILPHeuristicMapperOptions options, ILPHeuristicMapperCaches caches={})
const NodeFilter allowAllNodes
MRRGProcedureCacheHandle * mrrg_proc_cache
std::function< bool(const MRRG::NodeDescriptor &node)> NodeFilter
static SolverID GoogleORTools_SatCP
SolutionSelector solution_selector
ConfigStore test_placement_options
Mapping real_mapOpGraph(std::shared_ptr< OpGraph > opgraph, int II, const MRRG &mrrg, std::unordered_map< std::string, std::string >fix_port) const
void setStatus(MappingStatus new_status)
std::function< double(const FunctionalUnitNeighbours &fu_neighbours, const OpGraphOp &src_op, const MRRG::NodeDescriptor &src_node, const OpGraphOp &sink_op, const MRRG::NodeDescriptor &sink_node)> EdgeCoster