I am just wondering what is the difference between calling a CUDA kernel function with
<<<BLOCK_NUM, THREAD_NUM>>>
and
<<<BLOCK_NUM, THREAD_NUM, THREAD_NUM * sizeof(float)>>> ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The additional argument in the second case specifies the amount of dynamic shared memory to be allocated to each block in the kernel.
For example, if you have a kernel defined like this:
The second kernel launch would attempt to allocate
THREAD_NUMwords for the shared memory arraybufferfor each block of the kernel. See Appendix B.17 of CUDA 4.1 programming guide for more information.