Skip to content

Commit

Permalink
[onert/onert_run] Allow shape_prepare and shape_run together (#13654)
Browse files Browse the repository at this point in the history
This commit updates argument policy to allow shape_prepare and shape_run together.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Aug 14, 2024
1 parent c31c280 commit 4524a72
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/tools/onert_run/src/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,8 @@ void Args::Parse(const int argc, char **argv)
_mem_poll = _arser.get<bool>("--mem_poll");
_write_report = _arser.get<bool>("--write_report");

// calling, e.g., "onert_run .. -- shape_prepare .. --shape_run .." should theoretically
// work but allowing both options together on command line makes the usage and implemenation
// of onert_run too complicated. Therefore let's not allow those option together.
auto shape_prepare = _arser.get<std::string>("--shape_prepare");
auto shape_run = _arser.get<std::string>("--shape_run");
if (!shape_prepare.empty() && !shape_run.empty())
{
std::cerr << "Two options '--shape_prepare' and '--shape_run' cannot be given at once"
<< std::endl;
exit(1);
}

if (!shape_prepare.empty())
{
#if defined(ONERT_HAVE_HDF5) && ONERT_HAVE_HDF5 == 1
Expand Down

0 comments on commit 4524a72

Please sign in to comment.