Modified error to warning when check consumed tensor (#572)

If graph has free INPUT or OUTPUT, modified error to
warning when check in graph compile

Type: Code refine

Signed-off-by: Chen Xin <jack.chen@verisilicon.com>
Co-authored-by: Chen Xin <jack.chen@verisilicon.com>
This commit is contained in:
chxin66 2023-04-10 13:28:51 +08:00 committed by GitHub
parent 27890719b6
commit a32f255d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -222,12 +222,10 @@ bool GraphImpl::Compile() {
bool status = true;
if (not_consumed_input_cnt_ > 0 ) {
// Tensor can bind to different operations
VSILOGE("Graph has free input, INPUT tensor may be created with OUTPUT attr.");
return false;
VSILOGW("Graph has free input, INPUT tensor may be created but not consumed.");
}
if (not_consumed_output_cnt_ != 0) {
VSILOGE("Graph has free output, OUTPUT tensor may be created with INPUT attr.");
return false;
VSILOGW("Graph has free output, OUTPUT tensor may be created but not consumed.");
}
status = Setup();
std::call_once(verify_graph_once_, [&status, this]() {