mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-02 01:28:31 +00:00
[autoparallel] fix linear logical convert issue (#1857)
This commit is contained in:
@@ -32,7 +32,8 @@ class Solver:
|
||||
memory_budget: float = -1.0,
|
||||
solution_numbers: int = 1,
|
||||
forward_only: bool = False,
|
||||
memory_increasing_coefficient: float = 1.3):
|
||||
memory_increasing_coefficient: float = 1.3,
|
||||
verbose=True):
|
||||
'''
|
||||
Solver class will integrate information provided by the components and use ILP solver to find a possible optimal strategies combination for target computing graph.
|
||||
Argument:
|
||||
@@ -64,6 +65,7 @@ class Solver:
|
||||
self.last_s_val = None
|
||||
# The last objective value of the best ILP solution.
|
||||
self.last_objective = None
|
||||
self.verbose = verbose
|
||||
|
||||
def _recover_merged_node_strategy(self):
|
||||
'''
|
||||
@@ -177,7 +179,7 @@ class Solver:
|
||||
# omit initial value for nodes
|
||||
s_init_np = None
|
||||
|
||||
return node_nums, memory_budget, strategies_len, following_nodes, edge_pairs, alias_set, liveness_set, compute_costs, communication_costs, memory_costs, resharding_costs, alias_convert_costs, s_init_np
|
||||
return node_nums, memory_budget, strategies_len, following_nodes, edge_pairs, alias_set, liveness_set, compute_costs, communication_costs, memory_costs, resharding_costs, alias_convert_costs, s_init_np, self.verbose
|
||||
|
||||
def _call_solver_serialized_args(self,
|
||||
node_nums,
|
||||
@@ -192,7 +194,8 @@ class Solver:
|
||||
memory_costs,
|
||||
resharding_costs,
|
||||
alias_convert_costs,
|
||||
s_init_np=None):
|
||||
s_init_np=None,
|
||||
verbose=True):
|
||||
"""
|
||||
Call the solver with serialized arguments.
|
||||
"""
|
||||
@@ -407,8 +410,6 @@ class Solver:
|
||||
# if v[idx][row * C + col] > 0.5:
|
||||
# prob += s[i][row] + s[j][col] <= 1
|
||||
|
||||
verbose = True
|
||||
|
||||
msg = verbose
|
||||
time_limit = 600
|
||||
assert "COIN_CMD" in pulp.listSolvers(
|
||||
|
Reference in New Issue
Block a user