Skip to content

Commit

Permalink
app/mldev: fix error reporting on IO failure
Browse files Browse the repository at this point in the history
Application is reporting the test output as success when a
failure occurs in writing the output. Fix incorrect error
reporting on failure to write output files.

Fixes: da67933 ("app/mldev: support inference validation")
Cc: stable@dpdk.org

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
  • Loading branch information
syalavarthi authored and tmonjalo committed Jul 7, 2023
1 parent 28a4a81 commit 72d0f9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/test-mldev/test_inference_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,6 @@ ml_inference_validation(struct ml_test *test, struct ml_request *req)
goto next_output;
}
done:
if (match)
t->nb_valid++;

return match;
}

Expand All @@ -892,10 +889,8 @@ ml_request_finish(struct rte_mempool *mp, void *opaque, void *obj, unsigned int
rte_ml_io_dequantize(t->cmn.opt->dev_id, model->id, t->model[req->fid].nb_batches,
req->output, model->output);

if (model->reference == NULL) {
t->nb_valid++;
if (model->reference == NULL)
goto dump_output_pass;
}

if (!ml_inference_validation(opaque, req))
goto dump_output_fail;
Expand All @@ -920,6 +915,7 @@ ml_request_finish(struct rte_mempool *mp, void *opaque, void *obj, unsigned int
if (error)
return;
}
t->nb_valid++;

return;

Expand Down

0 comments on commit 72d0f9f

Please sign in to comment.