Remove all the memcpy


We are using C++ TensorRT to optimize a torch net,but got a problem. As for the input data is very large , so we need to remove all the memcpy. We take the data pointer of torch tensor as the input of TRT which is CUDA memory and use the output as a new Tensor’s data pointer. Our input is dynamic, when the input size reaches a certain size, error occurred which is shown “an illegal memory access was encountered”. The error occurs when we print or use the result tensor after TRT inference. I want to ask what could cause this error.Thanks


TensorRT Version: 7.2.1
GPU Type: Tesla T4
Nvidia Driver Version: 440.44
CUDA Version: 10.2
CUDNN Version: 8.0.4
Operating System + Version:
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable): 1.6.0
Baremetal or Container (if container which image + tag):

Relevant Files

Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)

Steps To Reproduce

Please include:

  • Exact steps/commands to build your repro
  • Exact steps/commands to run your repro
  • Full traceback of errors encountered

Hi @2725433662,

We recommend you to please share issue reproducible script for better assistance.

Thank you.