Skip to content

Commit

Permalink
comment out solver debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Nov 14, 2023
1 parent cfff1d1 commit 22ad937
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/Analysis/ReduceNoiseAnalysis/ReduceNoiseAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,11 @@ ReduceNoiseAnalysis::ReduceNoiseAnalysis(Operation *op) {
});
});

std::string modelAsString;
solver->ExportModelAsLpFormat(false, &modelAsString);

LLVM_DEBUG(llvm::dbgs() << "Model string = " << modelAsString << "\n");
// Uncomment if you want to read the model's textual description,
// generally not for those unfamiliar with linear programming.
// std::string modelAsString;
// solver->ExportModelAsLpFormat(false, &modelAsString);
// LLVM_DEBUG(llvm::dbgs() << "Model string = " << modelAsString << "\n");

solver->Solve();
LLVM_DEBUG(llvm::dbgs() << "Problem solved in " << solver->wall_time()
Expand All @@ -250,11 +251,11 @@ ReduceNoiseAnalysis::ReduceNoiseAnalysis(Operation *op) {
LLVM_DEBUG(llvm::dbgs() << "Solution:\n");
LLVM_DEBUG(llvm::dbgs() << "Objective value = " << objective->Value()
<< "\n");
LLVM_DEBUG(llvm::dbgs() << "Variables:\n");
for (auto var : allVariables) {
LLVM_DEBUG(llvm::dbgs() << " " << var->name() << " = "
<< var->solution_value() << "\n");
}
// LLVM_DEBUG(llvm::dbgs() << "Variables:\n");
// for (auto var : allVariables) {
// LLVM_DEBUG(llvm::dbgs() << " " << var->name() << " = "
// << var->solution_value() << "\n");
// }

for (auto item : decisionVariables) {
solution.insert(std::make_pair(item.first, item.second->solution_value()));
Expand Down

0 comments on commit 22ad937

Please sign in to comment.