diff --git a/dreamplace/BasicPlace.py b/dreamplace/BasicPlace.py index ca5f70f..15a79b2 100644 --- a/dreamplace/BasicPlace.py +++ b/dreamplace/BasicPlace.py @@ -402,7 +402,8 @@ def __init__(self, params, placedb, timer): # rectilinear minimum steiner tree wirelength from flute # can only be called once #self.op_collections.rmst_wl_op = self.build_rmst_wl(params, placedb, self.op_collections.pin_pos_op, torch.device("cpu")) - self.op_collections.timing_op = self.build_timing_op(params, placedb, timer) + if params.timing_opt_flag: + self.op_collections.timing_op = self.build_timing_op(params, placedb, timer) # legality check self.op_collections.legality_check_op = self.build_legality_check( params, placedb, self.data_collections, self.device) diff --git a/dreamplace/NonLinearPlace.py b/dreamplace/NonLinearPlace.py index cd5acc5..6131ab1 100644 --- a/dreamplace/NonLinearPlace.py +++ b/dreamplace/NonLinearPlace.py @@ -52,8 +52,8 @@ def __call__(self, params, placedb): """ iteration = 0 all_metrics = [] - timing_op = self.op_collections.timing_op if params.timing_opt_flag: + timing_op = self.op_collections.timing_op time_unit = timing_op.timer.time_unit() # global placement