Skip to content

Commit d887452

Browse files
committed
Merge remote-tracking branch 'origin' into rr_drawing_update
2 parents a9c0364 + 17f3a9e commit d887452

File tree

17 files changed

+87
-32
lines changed

17 files changed

+87
-32
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,27 +122,42 @@ jobs:
122122
fail-fast: false
123123
matrix:
124124
include:
125-
- { name: 'C/C++', script: 'check-format.sh' }
126-
- { name: 'Python', script: 'check-format-py.sh' }
127-
- { name: 'Python Lint', script: 'pylint_check.py' }
125+
- { name: 'C/C++', script: 'check-format.sh' , with_python: 'no', pkgs: 'clang-format-18' }
126+
- { name: 'Python', script: 'check-format-py.sh', with_python: 'yes', pkgs: '' }
127+
- { name: 'Python Lint', script: 'pylint_check.py' , with_python: 'yes', pkgs: '' }
128128
name: 'F: ${{ matrix.name }}'
129129
steps:
130130

131+
- uses: actions/checkout@v4
132+
# NOTE: We do not need sub-modules. We do not check sub-modules for formatting.
133+
131134
# TODO: This should be on the same version of Python as would be found on
132135
# Ubuntu 24.04 (3.12.3); however that version has some linting errors.
136+
# - The version of Pylint in requirements.txt is not compatible with
137+
# python version 3.12.3. Pylint needs to be updated to move to this version.
133138
- uses: actions/setup-python@v5
139+
if: ${{ matrix.with_python == 'yes' }}
134140
with:
135141
python-version: 3.10.10
136142

137-
- uses: actions/checkout@v4
138-
with:
139-
submodules: 'true'
143+
- name: Build Python Virtual Env
144+
run: |
145+
python -m venv .venv
146+
147+
- name: Install Python Requirements
148+
if: ${{ matrix.with_python == 'yes' }}
149+
run: |
150+
source .venv/bin/activate
151+
pip install -r requirements.txt
140152
141153
- name: Install dependencies
142-
run: ./.github/scripts/install_dependencies.sh
154+
if: ${{ matrix.pkgs }}
155+
run: sudo apt install -y ${{ matrix.pkgs }}
143156

144157
- name: Test
145-
run: ./dev/${{ matrix.script }}
158+
run: |
159+
source .venv/bin/activate
160+
./dev/${{ matrix.script }}
146161
147162
148163
VerifyTestSuites:

libs/EXTERNAL/libcatch2

Submodule libcatch2 updated 98 files

libs/EXTERNAL/libezgl

libs/libarchfpga/src/physical_types.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,11 @@ enum e_pin_type {
171171
enum e_interconnect {
172172
COMPLETE_INTERC = 1,
173173
DIRECT_INTERC = 2,
174-
MUX_INTERC = 3
174+
MUX_INTERC = 3,
175+
NUM_INTERC_TYPES = 4
175176
};
177+
/* String version of interconnect types. Use for debugging messages */
178+
constexpr std::array<const char*, NUM_INTERC_TYPES> INTERCONNECT_TYPE_STRING = {{"unknown", "complete", "direct", "mux"}};
176179

177180
/* pin location distributions */
178181
enum class e_pin_location_distr {

libs/librrgraph/src/base/rr_graph_builder.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ void RRGraphBuilder::create_edge_in_cache(RRNodeId src, RRNodeId dest, RRSwitchI
188188
is_incoming_edge_dirty_ = true;
189189
}
190190

191+
void RRGraphBuilder::create_edge(RRNodeId src, RRNodeId dest, RRSwitchId edge_switch, bool remapped) {
192+
edges_to_build_.emplace_back(src, dest, size_t(edge_switch), remapped);
193+
is_edge_dirty_ = true; /* Adding a new edge revokes the flag */
194+
is_incoming_edge_dirty_ = true;
195+
}
196+
191197
void RRGraphBuilder::build_edges(const bool& uniquify) {
192198
if (uniquify) {
193199
std::sort(edges_to_build_.begin(), edges_to_build_.end());

libs/librrgraph/src/base/rr_graph_builder.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ class RRGraphBuilder {
298298
* @note This will not add an edge to storage. You need to call build_edges() after all the edges are cached. */
299299
void create_edge_in_cache(RRNodeId src, RRNodeId dest, RRSwitchId edge_switch, bool remapped);
300300

301+
/** @brief Add a new edge to the cache of edges to be built
302+
* @note This will not add an edge to storage! You need to call build_edges() after all the edges are cached! */
303+
void create_edge(RRNodeId src, RRNodeId dest, RRSwitchId edge_switch, bool remapped);
304+
301305
/** @brief Allocate and build actual edges in storage.
302306
* Once called, the cached edges will be uniquified and added to routing resource nodes,
303307
* while the cache will be empty once build-up is accomplished
@@ -392,6 +396,13 @@ class RRGraphBuilder {
392396
return node_storage_.count_rr_switches(arch_switch_inf, arch_switch_fanins);
393397
}
394398

399+
/** @brief Unlock storage; required to modify an routing resource graph after edge is read */
400+
inline void unlock_storage() {
401+
node_storage_.edges_read_ = false;
402+
node_storage_.partitioned_ = false;
403+
node_storage_.clear_node_first_edge();
404+
}
405+
395406
/** @brief Reserve the lists of nodes, edges, switches etc. to be memory efficient.
396407
* This function is mainly used to reserve memory space inside RRGraph,
397408
* when adding a large number of nodes/edge/switches/segments,

libs/libvtrcapnproto/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ capnp_generate_cpp(CAPNP_SRCS CAPNP_HDRS
3232
)
3333

3434
if (VPR_ENABLE_INTERCHANGE)
35-
set(IC_DIR ${CMAKE_SOURCE_DIR}/libs/EXTERNAL/libinterchange/interchange)
35+
set(IC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../EXTERNAL/libinterchange/interchange)
3636
set(CAPNPC_SRC_PREFIX ${IC_DIR})
3737

3838
find_program(WGET wget REQUIRED)

libs/libvtrutil/src/vtr_geometry.tpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <limits>
2+
13
#include "vtr_assert.h"
24

35
namespace vtr {

vpr/src/analytical_place/analytical_solver.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,14 +436,14 @@ class B2BSolver : public AnalyticalSolver {
436436
/// solved solution HPWL).
437437
/// Decreasing this number toward zero would cause the B2B solver to run
438438
/// more iterations to try and reduce the HPWL further.
439-
static constexpr double b2b_convergence_gap_fac_ = 0.001;
439+
static constexpr double b2b_convergence_gap_fac_ = 0.0001;
440440

441441
/// @brief The number of times the B2B loop should "converge" before stopping
442442
/// the loop. Due to numerical inaccuracies, it is possible for the
443443
/// HPWL to bounce up and down as it converges. Increasing this number
444444
/// will allow more bounces which may get better quality; however
445445
/// more iterations will need to be run.
446-
static constexpr unsigned target_num_b2b_convergences_ = 2;
446+
static constexpr unsigned target_num_b2b_convergences_ = 1;
447447

448448
/// @brief Max number of bound update / solve iterations. Increasing this
449449
/// number will yield better quality at the expense of runtime.
@@ -460,7 +460,7 @@ class B2BSolver : public AnalyticalSolver {
460460
/// to prevent this behaviour and get good runtime.
461461
// TODO: Need to investigate this more to find a good number for this.
462462
// TODO: Should this be a proportion of the design size?
463-
static constexpr unsigned max_cg_iterations_ = 150;
463+
static constexpr unsigned max_cg_iterations_ = 100;
464464

465465
// The following constants are used to configure the anchor weighting.
466466
// The weights of anchors grow exponentially each iteration by the following

vpr/src/analytical_place/global_placer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class SimPLGlobalPlacer : public GlobalPlacer {
127127
/// between the two bounds, normalized to the upper-bound, is smaller
128128
/// than this number.
129129
/// This number was empircally found to work well.
130-
static constexpr double target_hpwl_relative_gap_ = 0.05;
130+
static constexpr double target_hpwl_relative_gap_ = 0.01;
131131

132132
/// @brief The solver which generates the lower-bound placement.
133133
std::unique_ptr<AnalyticalSolver> solver_;

0 commit comments

Comments
 (0)