Description
I am using TensorRT engine for inference using Python api.
with engine.create_execution_context() as context:
context.debug_sync = False
# Transfer input data to the GPU.
cuda.memcpy_htod_async(d_input_1, h_input_1, stream)
# Run inference.
context.profiler = trt.Profiler()
context.execute(batch_size=1, bindings=[int(d_input_1), int(d_output)])
# Transfer predictions back from the GPU.
cuda.memcpy_dtoh_async(h_output, d_output, stream)
# Synchronize the stream
stream.synchronize()
# Return the host output.
out = h_output.reshape((1,-1))
return out
each time context.execute(batch_size=1, bindings=[int(d_input_1), int(d_output)])
it logs the model layers all of them which make the console not suitable for debugging. I tried to disable it but I couldn’t.
I think the problem is in this method engine.create_execution_context()
as documented in the api this return IExecutionContext with debug_sync
set to True
. I don’t know if this is a bug or not.
I used context.debug_sync = False
but it didn’t stop logging the execution layers.
how I could disable logging the execution layers to the console?
Environment
Jetson TX 2, JetPack 4.4
TensorRT Version:
TensorRT 7.1
GPU Type:
Jetosn TX 2
Nvidia Driver Version:
CUDA Version:
CUDNN Version:
Operating System + Version:
Ubuntu 18.04
Python Version (if applicable):
Python 3.6.9