Skip to content

Commit 3185e4a

Browse files
weberlotmoreau89
authored andcommitted
[Relay] Improve build error when no lowered funcs are produced (#4132)
* Improve build error when no lowered funcs * Switch from fatal to warning
1 parent 02c1e11 commit 3185e4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/relay/backend/build_module.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,9 @@ class RelayBuildModule : public runtime::ModuleNode {
460460
ret_.params = graph_codegen_->GetParams();
461461

462462
auto lowered_funcs = graph_codegen_->GetLoweredFunc();
463-
if (lowered_funcs.size() != 0) {
463+
if (lowered_funcs.size() == 0) {
464+
LOG(WARNING) << "no lowered funcs exist in the compiled module";
465+
} else {
464466
ret_.mod = tvm::build(
465467
lowered_funcs,
466468
target_host_,

0 commit comments

Comments
 (0)