When importing the demo (https://docs.tvm.ai/tutorials/frontend/from_tensorflow.html )and running it locally for testing, the run process executes faster, but the result output takes time.
execute
"
time1 = time.clock()
m.set_input(‘DecodeJpeg/contents’, tvm.nd.array(x.astype(dtype)))
m.set_input(**params)
m.run()
time3 = time.clock()
tvm_output = m.get_output(0, tvm.nd.empty(((1, 1008)), ‘float32’))
time4 = time.clock()
print(“time4 - time3:”, time4 - time3)
print(“time3 - time1:”, time3 - time1)
"
#result:
time4 - time3: 1.049209000000019
time3 - time1: 0.5478069999999775
environment:
cuda版本:CUDA Version 10.0.130
cudnn:7.6.5
tensorflow-gpu版本:1.14.0
python版本:3.5.9
GPU:tesla p4