code: def do_inference_v2(context, bindings, inputs, outputs, stream):
      # Transfer input data to the GPU.
      [
          cuda.memcpy_htod_async(inp.device, inp.host, stream)
          for inp in inputs
      ]
      # Run inference.
      context.execute_async_v2(
          bindings=bindings, stream_handle=stream.handle
      )
      # Transfer predictions back from the GPU.
      [
          cuda.memcpy_dtoh_async(out.host, out.device, stream)
          for out in outputs
      ]
      # Synchronize the stream
      stream.synchronize()
      # Return only the host outputs.
      return [out.host for out in outputs]
  
file_path: nni/nni/compression/quantization_speedup/trt_pycuda.py
imports: import pycuda.driver
  import pycuda.autoinit
  import tensorrt
label_desc: Use image node_id 4 for calling a global function with example usage: do_inference_v2(context, bindings, inputs, outputs, stream) and returns: unknown