mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Perf Bug Fix: Keep First Run for Random Input (#11366)
This commit is contained in:
parent
a7d0158c24
commit
88ff48910d
1 changed files with 4 additions and 2 deletions
|
|
@ -346,7 +346,9 @@ def inference_ort(
|
|||
args.io_binding,
|
||||
io_binding,
|
||||
)
|
||||
runtimes += runtime[1:] # remove warmup
|
||||
if args.input_data == "fix":
|
||||
runtime = runtime[1:] # remove warmup
|
||||
runtimes += runtime
|
||||
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
|
@ -1187,7 +1189,7 @@ def run_onnxruntime(args, models):
|
|||
inputs, ref_outputs = get_test_data(fp16, test_data_dir, all_inputs_shape)
|
||||
# generate random input data
|
||||
if args.input_data == "random":
|
||||
inputs = generate_onnx_model_random_input(args.test_times + 1, inputs[0])
|
||||
inputs = generate_onnx_model_random_input(args.test_times, inputs[0])
|
||||
|
||||
#######################################
|
||||
# benchmark or validation
|
||||
|
|
|
|||
Loading…
Reference in a new issue