Skip to content

Commit f11da67

Browse files
committed
Modified build_device_grid function call in SetupGrid.cpp to get rid of unnecessary warning messages during clustering
1 parent c8b58b8 commit f11da67

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

vpr/src/base/SetupGrid.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ static DeviceGrid auto_size_device_grid(const std::vector<t_grid_def>& grid_layo
191191
//Check if it satisfies the block counts
192192
if (grid_satisfies_instance_counts(grid, minimum_instance_counts, maximum_device_utilization)) {
193193
//Re-build the grid at the final size with out-of-range
194-
//warnings turned on (so users are aware of out-of-range issues
195-
//at the final device sizes)
196-
grid = build_device_grid(grid_def, width, height, true, limiting_resources);
194+
grid = build_device_grid(grid_def, width, height, false, limiting_resources);
197195
return grid;
198196
}
199197

@@ -406,8 +404,6 @@ static DeviceGrid build_device_grid(const t_grid_def& grid_def, size_t grid_widt
406404
size_t incry = p.parse_formula(yspec.incr_expr, vars);
407405
size_t repeaty = p.parse_formula(yspec.repeat_expr, vars);
408406

409-
warn_out_of_range = false;
410-
411407
//Check start against the device dimensions
412408
// Start locations outside the device will never create block instances
413409
if (startx > grid_width - 1) {

vpr/src/base/constraints_load.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
static void print_region(FILE* fp, Region region);
44
static void print_partition(FILE* fp, Partition part);
55
static void print_partition_region(FILE* fp, PartitionRegion pr);
6-
static void print_constraints(FILE* fp, VprConstraints constraints, int num_parts);
6+
static void print_constraints(FILE* fp, VprConstraints constraints);
77

88
void print_region(FILE* fp, Region region) {
99
vtr::Rect<int> rect = region.get_region_rect();
@@ -42,10 +42,14 @@ void print_partition_region(FILE* fp, PartitionRegion pr) {
4242
}
4343
}
4444

45-
void print_constraints(FILE* fp, VprConstraints constraints, int num_parts) {
45+
void print_constraints(FILE* fp, VprConstraints constraints) {
4646
Partition temp_part;
4747
std::vector<AtomBlockId> atoms;
4848

49+
int num_parts = constraints.get_num_partitions();
50+
51+
fprintf(fp, "\n Number of partitions is %d \n", num_parts);
52+
4953
for (int i = 0; i < num_parts; i++) {
5054
PartitionId part_id(i);
5155

@@ -71,14 +75,11 @@ void echo_constraints(char* filename, VprConstraints constraints) {
7175
FILE* fp;
7276
fp = vtr::fopen(filename, "w");
7377

74-
int num_of_parts = constraints.get_num_partitions();
75-
7678
fprintf(fp, "--------------------------------------------------------------\n");
7779
fprintf(fp, "Constraints\n");
7880
fprintf(fp, "--------------------------------------------------------------\n");
7981
fprintf(fp, "\n");
80-
fprintf(fp, "\n Number of partitions is %d \n", num_of_parts);
81-
print_constraints(fp, constraints, num_of_parts);
82+
print_constraints(fp, constraints);
8283

8384
fclose(fp);
8485
}

0 commit comments

Comments
 (0)