Files
apache--tvm/python/tvm
Gustavo Romero 24e5498021 [TVMC] compile/tune: Check if FILE exists (#10865)
Currently when a non-existing FILE is passed to 'tvmc tune' it throws
a traceback because a FileNotFoundError exception is not handled. Since
there is no need for such abrupt exit, and the trace can also confuse
users, this commit fixes it by checking if FILE indeed exists, kindly
informing the user about the non-existing FILE before exiting.

Add test for verifying if 'tvmc compile' and 'tvmc tune' commands handle
correctly the FILE option when it is invalid (e.g. missing, a dir, or a
broken link).

A TVMCException will be generated by test_tune_rpc_tracker_parsing test
because FILE will be set by pytest to a mock object, which is not a
valid input. Since FILE argument is irrelevant for the test in question,
circumvent the Mock hijack of FILE argument by setting it before using
mock.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2022-04-25 15:47:01 +01:00
..
2022-04-21 14:15:52 -07:00
2022-04-21 10:55:04 -07:00
2020-02-13 20:24:01 -08:00