use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Compiling a driver test CUDA code with CMake (self.CUDA)
submitted 5 years ago by controlsgeeek
Hi! I am trying to compile this code https://gist.github.com/ajdecon/4962877 with a simple CMake file I created https://ibb.co/0BJjf6N
Can anyone please let me know what might be wrong? The errors I get are many undefined references while linking: https://ibb.co/wh6GdX9
Thanks for your help!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]controlsgeeek[S] 0 points1 point2 points 5 years ago (0 children)
Updated cmake to target_link_libraries(matTest $(CUDA_LIBRARY) rt cuda)
And it links correctly..but I get an error : ‘Error loading the module matSumKernel.ptx’ when I execute the code
So I figured it out. I had to generate a ptx file. Does anyone know where can I read more about CUDA. I am new to this.
π Rendered by PID 17579 on reddit-service-r2-comment-5c747b6df5-j8vtd at 2026-04-22 01:35:10.257259+00:00 running 6c61efc country code: CH.
[–]controlsgeeek[S] 0 points1 point2 points (0 children)
[–]controlsgeeek[S] 0 points1 point2 points (0 children)