Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: cudnn.h: No such file or directory #96

Open
Alex-fishred opened this issue Mar 1, 2024 · 2 comments
Open

fatal error: cudnn.h: No such file or directory #96

Alex-fishred opened this issue Mar 1, 2024 · 2 comments

Comments

@Alex-fishred
Copy link

I'm trying to Build and Install Custom TensorRT Plugins
When I execute make -j$(nproc)
fatal error: cudnn.h: No such file or directory
#include <cudnn.h>
^
compilation terminated.
make[2]: *** [CMakeFiles/tensorrt_ops.dir/build.make:206: CMakeFiles/tensorrt_ops.dir/plugin/multi_head_attn/multiHeadAttnPlugin.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnKernel.cu:8:26: fatal error: cuda/std/cmath: No such file or directory
#include <cuda/std/cmath>
Any solution?

@Alex-fishred
Copy link
Author

Alex-fishred commented Mar 1, 2024

Update
I tried to copy the downloaded include file under Tensorrt8.x.x.x to TensorRT’s common
Solved the above problem
But then a lot of warnings and error appeared
warning: ‘virtual void nvinfer1::IGpuAllocator::free(void*)’ is deprecated [-Wdeprecated-declarations]
this->free(memory);
error: ‘cudaMallocAsync’ was not declared in this scope
cudaMallocAsync(&A, batch * q_len * embed_dim * sizeof(int8_t), stream);
^
/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnPlugin.cpp:488:26: error: ‘cudaFreeAsync’ was not declared in this scope
cudaFreeAsync(A, stream);
^
/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnPlugin.cpp: In instantiation of ‘void trt_plugin::QKVPlugin::chooseAlgo(const nvinfer1::DynamicPluginTensorDesc*, const nvinfer1::DynamicPluginTensorDesc*) [with T = float]’:
/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnPlugin.cpp:249:32: required from here
/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnPlugin.cpp:291:18: error: ‘cudaMallocAsync’ was not declared in this scope
cudaMallocAsync(&A, batch * q_len * embed_dim * sizeof(T), stream);

/mnt/f/BEVFormer_tensorrt-main/TensorRT/plugin/multi_head_attn/multiHeadAttnPlugin.cpp:292:18: error: ‘cudaMallocAsync’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
cudaMallocAsync(&B, batch * kv_len * embed_dim * sizeof(T), stream);
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Alex-fishred
Copy link
Author

I successfully solved the problem by copying the cudnn file to cuda in usr/local. You can refer to the cudnn installation method. I think I missed the step of copying the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant