Tensorrt: error: 鈥榗udaLaunchHostFunc' was not declared in this scope

Created on 14 Nov 2019  路  7Comments  路  Source: NVIDIA/TensorRT

Description

Environment

TensorRT Version: 6
GPU Type: 1080
Nvidia Driver Version:
CUDA Version: 9.0.176
CUDNN Version: 7.6.4
Operating System + Version: ubuntu16.04
Python Version (if applicable):
TensorFlow Version (if applicable): 1.12
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Relevant Files


cudaerror

Steps To Reproduce


when run

cmake .. -DTRT_LIB_DIR=/data/TensorRT-6.0.1.5/lib -DTRT_BIN_DIR=`pwd`/out -DCUDA_VERSION=9.0 -DCUDNN_VERSION=7.6 -DBUILD_SAMPLES=ON -DGPU_ARCHS="61"

nothing wrong
but when run

make -j$(nproc)

i believe that it's a version problem, but nvidia says we can compile that with cuda9.0, so why?

11.1 OSS Build help wanted

All 7 comments

Hi @hwh-hit,

I don't have a 1080 to reproduce this, but some possible questions that come to mind:

  1. Did you install the TensorRT Release built for CUDA 9.0?

    • TensorRT-6.0.1.5.Ubuntu-16.04.x86_64-gnu.cuda-9.0.cudnn7.6.tar.gz

  2. Do you have the right CUDA Driver (r384): https://docs.nvidia.com/deeplearning/sdk/cudnn-support-matrix/index.html#cudnn-versions-763-765?
  3. Is your CUDA/Driver installation setup correctly? If you can run nvidia-smi successfully, that's probably a good sign. Or maybe trying to compile a very simple CUDA program with nvcc.
  4. Is your CUDA installation in the standard locations like /usr/lib/cuda, etc., like what is being looked for here: https://github.com/NVIDIA/TensorRT/blob/master/CMakeLists.txt#L126-L130 ?

For a sanity check, it might be worth it to reinstall CUDA and try again.

okay, thanks for your reply@rmccorm4
1.I exactly install the TensorRT-6.0.1.5 for cuda-9.0
2.Ah, the original cudnn version is 7.1.x, i update it to 7.6.4, not 7.6.3 ,maybe i should try 7.6.3?
3.I used this cuda-9.0 with 1080 for a long time,nothing wrong, nvidia-smi is also ran successfully.
4.CUDA installation in the standard location,/usr/local/cudu-9.0, anything wrong?

@rmccorm4
Hi, TensorRT/samples/common/sampleDevice.h:79:60:
void sleep(int* ms) { cudaCheck(cudaLaunchHostFunc(mStream, cudaSleep, ms)); }
the cuda running api cudaLaunchHostFunc is added in cuda10.x. tensorrt readme says that trt6 can be ran with cuda9,confused.Then the error always occurs, what should i do to fix that, looking forward to your reply.

@hwh-hit looks like you're right on that, cudaLaunchHostFunc seems to have been added in CUDA 10.0 per being present in docs for 10.0 (https://docs.nvidia.com/cuda/archive/10.0/cuda-runtime-api/group__CUDART__EXECUTION.html#group__CUDART__EXECUTION) but not 9.2 (https://docs.nvidia.com/cuda/archive/9.2/cuda-runtime-api/group__CUDART__EXECUTION.html#group__CUDART__EXECUTION)


You should be able to use the TensorRT release with CUDA 9.0 per the tarball you downloaded TensorRT-6.0.1.5.Ubuntu-16.04.x86_64-gnu.cuda-9.0.cudnn7.6.tar.gz.

However, as far as the OSS components go, I'm not sure. The CUDA 10.x code in samples/common/sampleDevice.h seems directly integrated into this repo's samples, but it may not affect the parsers/plugins. If you want to try just building the parsers/plugins, maybe that will work with - -DBUILD_SAMPLES=OFF.

If you're looking for samples to run, you should be able to run the samples that come with the TensorRT release (not the opensource ones in this repo) in $TRT_RELEASE/samples.

@rmccorm4 thanks for your reply. To be honest, I want to use the sampleUffMaskRCNN in opensource instead of release. Can the api --cudaLaunchHostFunc be replaced by some api in cuda9.0? Or can i move the sampleUffMaskRCNN to release,and how?Or something else i can do?thanks, looking forward to your reply.

@rajeevsrao Thanks, it worked, no errors when compiling.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbbug picture sbbug  路  5Comments

MachineJeff picture MachineJeff  路  5Comments

WangXuanBT picture WangXuanBT  路  3Comments

float123 picture float123  路  6Comments

Stephenfang51 picture Stephenfang51  路  3Comments