What using dynamics parallelism, I can't get the nvidia linker to work

for two month on and off I have been trying to write an Cuda addon to an application.
At first the plugin was a static library and I found a great deal of problems trying to get dynamics parallelism along with some othe thing that are not important now.
after reading all the docs, I had my hand off and following all the recommendations on these forums, blogs and other forums like stack overflood, nothing has worked and I keep getting the same unresolved references to some generated function generated by the the NVidia compiler.
I understood that since my project was a static library, that maybe this was the reason I could not get the link to work.
Finally I decided to play by the rules and make my project a dll.
after days and days trying to get it to work, it simply refuses to link and this time it does not even say what the error was. I simple get this message

2>C:\tmp>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\nvcc.exe” -dlink -o ndSolverCuda_1.dir\Debug\ndSolverCuda_1.device-link.obj -Xcompiler “/EHsc /W4 /nologo /Od /FdndSolverCuda_1.dir\Debug\vc143.pdb /Zi /RTC1 /MDd /GR” -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin/crt" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib\x64" “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib\Win32\cudadevrt.lib” “C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v11.7\lib\Win32\cudart_static.lib” cudadevrt.lib 2>nvlink fatal : unexpected object after cudadevrt

so I decide to make a extreme minimalist project to expose the error, but that still have the same error.
I uploaded on the link below in case any one what to take a look and tell me what it is.


as it stand now it I can no resolve this issue, it simply means a death blow to the entire project.

There are sample projects that demonstrate the use of CDP (CUDA Dynamic Parallelism), including projects files that show how the project should be set up. Any of these samples that begin with cdp have a sample project file that you may wish to inspect.

I have seen those demos, and many others from other NVidia GitHub depos.
I use them to write the cmake script, but since none of the demos has a cmake example,
it takes a lot or searching and try erro and fail in order to get a working script.
I did figured it out and I have it working from cmake.

so thanks for the answer. and you can close this topic.

NVIDIA is not responsible for the fact that CMAKE is a tool with a cumbersome user interface that adds another layer of obfuscation on top of makefiles. You may want to seek support for CMAKE at the relevant Discourse forum.

From what I have seen over the past decade, CMAKE seems to create more problems than it solves. My personal advice would be to avoid it and stick to simple makefiles as much as feasible.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.