Skip to content

Commit 434cffc

Browse files
committed
chore: Use suppress_errors to handle the logging
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 13ec78f commit 434cffc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: core/compiler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ torch::jit::Module CompileGraph(const torch::jit::Module& mod, CompileSpec cfg)
416416
if (cfg.partition_info.enabled &&
417417
!(cfg.lower_info.forced_fallback_modules.size() == 0 &&
418418
cfg.partition_info.forced_fallback_operators.size() == 0 &&
419-
conversion::VerifyConverterSupportForBlock(g->block(), false))) {
419+
conversion::VerifyConverterSupportForBlock(g->block(), true))) {
420420
auto input_ivalues_map = partitioning::generateRandomInputs(cfg.convert_info.inputs, first_use_types);
421421
auto graph_and_mapping = ConstructFallbackGraph(new_mod, g->block(), input_ivalues_map, cfg, static_params);
422422
new_g = graph_and_mapping.first;

Diff for: core/conversion/conversion.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ bool VerifyConverterSupportForBlock(const torch::jit::Block* b, bool suppress_er
527527
unsupported_msg << std::endl << "In Module:" << std::endl;
528528

529529
if (!suppress_errors) {
530-
LOG_DEBUG(unsupported_msg.str());
530+
LOG_ERROR(unsupported_msg.str());
531531
}
532532

533533
std::unordered_map<std::string, std::unordered_set<std::string>> unsupported_node_locations;
@@ -554,7 +554,7 @@ bool VerifyConverterSupportForBlock(const torch::jit::Block* b, bool suppress_er
554554
traceback << str;
555555
}
556556
auto tb_str = traceback.str();
557-
LOG_DEBUG(tb_str);
557+
LOG_ERROR(tb_str);
558558
}
559559

560560
return false;

0 commit comments

Comments
 (0)