Reputation: 1
I have a CUDA code that I am launching from a mex file in visual studios. I am only launching blocks in the x dimension, but get an error if I try to launch more than 65536 blocks, despite the fact that my compute capacity is 6.1 (according to the GPU devices tab under system info). Also under system info it says MAX_GRID_DIM_X is 2147483647. Is there some setting or environmental variable I need to change before I can launch this many blocks? What other things might be limiting the number of blocks I can launch?
Upvotes: 0
Views: 221
Reputation: 72349
Is there some setting or environmental variable I need to change before I can launch this many blocks?
No.
What other things might be limiting the number of blocks I can launch?
Compilation settings. You must choose a target compilation architecture which supports 2^31-1. On CUDA 9, the default compilation architecture is 3.0 and this supports extended 1D grid sizes. On older toolkits, the default will be 2.0 or older, and these do not.
Upvotes: 2