Skip to content

Commit

Permalink
chore: modify param name [-api_host] to [-api_addr]
Browse files Browse the repository at this point in the history
Signed-off-by: zarkin404 <[email protected]>
  • Loading branch information
zarkin404 committed Jun 30, 2023
1 parent 0fc6fbf commit 0446630
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/drt/include/triton_route/TritonRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class TritonRoute
void setDrRandomInitOrder(bool on = true);
void setSkipReroute(bool on = true);
void setRerouteNetsSortMode(int mode);
void setApiHost(const std::string& apiHost);
void setApiAddr(const std::string& apiAddr);
void setApiTimeout(int timeout);
void setNetOrderingTraining(bool on = true);
void setNetOrderingEvaluation(int mode);
Expand Down
4 changes: 2 additions & 2 deletions src/drt/src/TritonRoute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ void TritonRoute::setRerouteNetsSortMode(int sortMode)
debug_->rerouteNetsSortMode = sortMode;
}

void TritonRoute::setApiHost(const std::string& apiHost)
void TritonRoute::setApiAddr(const std::string& apiAddr)
{
debug_->apiHost = apiHost;
debug_->apiAddr = apiAddr;
}

void TritonRoute::setApiTimeout(int timeout)
Expand Down
4 changes: 2 additions & 2 deletions src/drt/src/TritonRoute.i
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ set_detailed_route_debug_cmd(const char* net_name,
bool dr_random_init_order,
bool skip_reroute,
int reroute_nets_sort_mode,
const char* api_host,
const char* api_addr,
int api_timeout,
bool net_ordering_training,
int net_ordering_evaluation)
Expand All @@ -198,7 +198,7 @@ set_detailed_route_debug_cmd(const char* net_name,
router->setDrRandomInitOrder(dr_random_init_order);
router->setSkipReroute(skip_reroute);
router->setRerouteNetsSortMode(reroute_nets_sort_mode);
router->setApiHost(api_host);
router->setApiAddr(api_addr);
router->setApiTimeout(api_timeout);
router->setNetOrderingTraining(net_ordering_training);
router->setNetOrderingEvaluation(net_ordering_evaluation);
Expand Down
10 changes: 5 additions & 5 deletions src/drt/src/TritonRoute.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ proc detailed_route_debug { args } {
sta::parse_key_args "detailed_route_debug" args \
keys {-net -worker -iter -pin -dump_dir -custom_size -custom_offset \
-parallel_workers -reroute_nets_sort_mode \
-api_host -api_timeout -net_ordering_evaluation} \
-api_addr -api_timeout -net_ordering_evaluation} \
flags {-dr -maze -pa -pa_markers -pa_edge -pa_commit -dump_dr -ta \
-dr_random_init_order -skip_reroute -custom_strategies\
-net_ordering_training}
Expand Down Expand Up @@ -309,10 +309,10 @@ proc detailed_route_debug { args } {
set reroute_nets_sort_mode 0
}

if { [info exists keys(-api_host)] } {
set api_host $keys(-api_host)
if { [info exists keys(-api_addr)] } {
set api_addr $keys(-api_addr)
} else {
set api_host ""
set api_addr ""
}

if { [info exists keys(-api_timeout)] } {
Expand All @@ -325,7 +325,7 @@ proc detailed_route_debug { args } {
$worker_x $worker_y $iter $custom_strategies $custom_size $custom_offset \
$parallel_workers $pa_markers $pa_edge $pa_commit $dump_dir \
$ta $dr_random_init_order $skip_reroute $reroute_nets_sort_mode \
$api_host $api_timeout $net_ordering_training $net_ordering_evaluation
$api_addr $api_timeout $net_ordering_training $net_ordering_evaluation
}

sta::define_cmd_args "pin_access" {
Expand Down
4 changes: 2 additions & 2 deletions src/drt/src/dr/FlexDR_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2564,9 +2564,9 @@ void FlexDRWorker::route_queue_init_queue(queue<RouteQueueEntry>& rerouteQueue)
vector<RouteQueueEntry> customOrderRoutes; // 记录即将替换掉初始排序的临时序列

// 当推断模式为「替换初始排序」时,使用算法排序好的序列
if (debugSettings_->apiHost != ""
if (debugSettings_->apiAddr != ""
&& debugSettings_->netOrderingEvaluation == 2) {
std::string addr = "tcp://" + debugSettings_->apiHost;
std::string addr = "tcp://" + debugSettings_->apiAddr;
utl::MQ mq(addr, debugSettings_->apiTimeout);

// 先将不需要布线的网络放到队列
Expand Down
4 changes: 2 additions & 2 deletions src/drt/src/dr/FlexDR_maze.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1798,10 +1798,10 @@ void FlexDRWorker::route_queue_main(queue<RouteQueueEntry>& rerouteQueue)
auto& workerRegionQuery = getWorkerRegionQuery();

// 训练模式,或者单步的推断模式
if (debugSettings_->apiHost != ""
if (debugSettings_->apiAddr != ""
&& (debugSettings_->netOrderingTraining
|| debugSettings_->netOrderingEvaluation == 1)) {
std::string addr = "tcp://" + debugSettings_->apiHost;
std::string addr = "tcp://" + debugSettings_->apiAddr;
utl::MQ mq(addr, debugSettings_->apiTimeout);

// 待布网络下标
Expand Down
2 changes: 1 addition & 1 deletion src/drt/src/frBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ struct frDebugSettings
bool drRandomInitOrder;
bool skipReroute;
int rerouteNetsSortMode;
std::string apiHost;
std::string apiAddr;
int apiTimeout;
bool netOrderingTraining;
int netOrderingEvaluation;
Expand Down

0 comments on commit 0446630

Please sign in to comment.