lhutton1 opened a new pull request, #12713:
URL: https://github.com/apache/tvm/pull/12713

   Currently executing `tvmc run module.tar` will run the input model twice. 
For benchmaking this is to be expected as the first run is used to prime caches 
etc before taking a measurement. However, this seems a bit unintuitive to have 
as default, especially when benchmarking is not always intended. In this sense, 
this commit aims to amend the number of runs for the default: `tvmc run 
module.tar` to a single run.
   
   After inspection, this seems to be down to the use of the `.benchmark()` 
method which runs (1 + repeat * number) executions in total. This means that at 
least two runs are required (i.e. when repeat=1, number=1). It also seems that 
it is only necessary to benchmark the model when `--print-time` has been set 
from the CLI POV. From the python interface POV, benchmarking is always run, 
but this may not always be necessary.
   
   This commit makes use of the `.run()` method to singularly execute the model 
by default. From the CLI this will be used when `--print-time` is set to False 
whereas from the python interface this will be used when `benchmark=False`. 
Otherwise, the `.benchmark()` method will be used as before. Complementary to 
this change `repeat`, `number` and `end_to_end` parameters are only used when 
either `--print-time` or `benchmark` are set to True - and the documentation 
has been updated to indicate this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to