Getting error: identifier "cudaGraphAddMemcpyNode1D" is undefined

Hi all, I am getting an error as below. Let me know what could be the issues and how to resolve it.
graph_node.cu(96): error: identifier “cudaGraphAddMemcpyNode1D” is undefined
detected during instantiation of “void createCudaGraph(cudaGraph_t &, cudaGraphExec_t &, cudaStream_t &, PtrType *, unsigned int, PtrType *) [with PtrType=unsigned int]”

Thanks and Regards

Nagaraj Trivedi

Hi,

You can find a CUDA graph sample below:

Thanks.

Hi, thank you for the information. I have referred this blog and executed the sample program and found working.
But the query I referred was not related to this. It captures the streams in run time, but the query was related to explicitly adding adding kernel nodes to the created graph. The source code file is attached, please have a look at it. The file name is graph_node.txt, when you open it change its extension to graph_node.cu
The Jetpack version used is 4.61 and tensorrt version is 8.0.1.6
Please do the needful.
graph_node.txt (4.1 KB)

Hi,

We checked the attached source and updated the #if 0 to #if 1 to include the common headers.
The sample works well in our environment. Please try it again.

$ /usr/local/cuda/bin/nvcc test.cu -o test
$ ./test
It is CUDA graph code
Memory to deviceBuffer is allocated
Entered createCudaGraph
Grid dimension.x is 1 gridDim.y 1

Thanks.

Hi, I tried it, but gave the same error. Let me know what is the tensorrt and cuda version you are using. Here is the error message

~/program/nagaraj$ cd NVIDIA/CUDA/cuda_grpah/
mistral@ubuntu:~/program/nagaraj/NVIDIA/CUDA/cuda_grpah$ nvcc graph_node.cu
graph_node.cu(96): error: identifier “cudaGraphAddMemcpyNode1D” is undefined
detected during instantiation of “void createCudaGraph(cudaGraph_t &, cudaGraphExec_t &, cudaStream_t &, PtrType *, unsigned int, PtrType *) [with PtrType=unsigned int]”
(122): here

1 error detected in the compilation of “/tmp/tmpxft_00007cd9_00000000-8_graph_node.cpp1.ii”.

Hi,

Do you use Orin Nano or Jetson Nano?

We tested this on JetPack 5.1.2 with CUDA 11.4.
Please give it a try.

Thanks.

Hi, thank you for your response. I use Xavior and the device information is.
[11/22/2023-09:21:38] [I] Selected Device: Xavier
[11/22/2023-09:21:38] [I] Compute Capability: 7.2

The jetpack version is
Package: nvidia-jetpack
Version: 4.6-b199

Thanks and Regards

N.M.Trivedi

Hi,

There is no cudaGraphAddMemcpyNode1D in the CUDA 10.2 API:
Please find below doc for the info:
https://docs.nvidia.com/cuda/archive/10.2/cuda-runtime-api/group__CUDART__GRAPH.html#group__CUDART__GRAPH

Thanks.

Hi, thank you for your response. I am using the tensorrt version

import tensorrt
print(tensorrt.version)
8.0.1.6

For this version of the tensorrt what is the compatible version of the CUDA. This will help us to resolve this issue.
Please let me know.

Thanks and Regards

Nagaraj Trivedi

Hi,

CUDA 10.2 is compatible for TensorRT 8.0.

But there is no cudaGraphAddMemcpyNode1D in the CUDA 10.2.
The API is added in CUDA 11 or newer.

Thanks.

Hi, may I know what is the alternative to this that exists in CUDA 10.2

Thanks and Regards

Nagaraj Trivedi

Hi,

The feature supported in the CUDA 10.2 can be found in the document shared above.

Unfortunately, cudaGraphAddMemcpyNode1D will need a newer CUDA.
Please switch to a device that can use JetPack 5 to get the feature.

Thanks.