Skip to content

Commit b6ffc69

Browse files
committed
[ParallelRouter] Added Comments for Setting Core Affinity List
Added detailed comments for configuring the core affinity list in the parallel router.
1 parent 91cb6c1 commit b6ffc69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vpr/src/route/parallel_connection_router.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <fstream>
1515

16+
// For details on setting core affinity, please see `parse_core_affinity_list`.
1617
#define ENABLE_CORE_AFFINITY
1718

1819
#define VPR_PARALLEL_CONNECTION_ROUTER_USE_MULTI_QUEUE
@@ -129,6 +130,10 @@ inline std::vector<std::string> get_tokens_split_by_delimiter(std::string str, c
129130
return tokens;
130131
}
131132

133+
// To assign core affinity (i.e., pin threads to specific cores), please set the
134+
// environment variable `export VPR_CORE_AFFINITY=0-8` before running VPR.
135+
// Formats such as `0,1,2,3,4,5,6,7` and `0-7` and `0-3,4-7` and `0,1-2,3-6,7`
136+
// are all supported.
132137
inline std::vector<size_t> parse_core_affinity_list(std::string str) {
133138
std::vector<size_t> core_affinity_list;
134139
std::vector<std::string> lv1_tokens_split_by_comma = get_tokens_split_by_delimiter(str, ',');

0 commit comments

Comments
 (0)