Skip to content

Commit c6eec8e

Browse files
Add error checking to quickTuningGen solver.
1 parent 47028eb commit c6eec8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/utils/performance/analysis/quickTuningGen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ def find(self):
318318
prob += pulp.lpSum([a[i][j] * x[j] for j in range(m)]) >= 1, f"Cover_problem_{i}"
319319

320320
prob.solve(pulp.PULP_CBC_CMD(msg=0))
321+
if prob.status != pulp.LpStatusOptimal:
322+
raise ValueError(f"No optimal solution found for data type {data_type}")
321323

322324
selected_configs = [perfconfigs[j] for j in range(m) if x[j].varValue == 1]
323325

0 commit comments

Comments
 (0)