Reputation: 309
I'm trying to compile my CUDA C code for a GPU with sm_10
architecture which does not support invoking malloc
from __global__
functions.
I need to keep a tree for which the nodes are created dynamically in the GPU memory. Unfortunately, without malloc
apparently I can't do that.
Is there is a way to copy an entire tree using cudaMalloc
? I think that such an approach will just copy the root of my tree.
Upvotes: 0
Views: 843
Reputation: 21455
Quoting the CUDA C Programming Guide
Dynamic global memory allocation and operations are only supported by devices of compute capability 2.x and higher.
For compute capability earlier than 2.0
, the only possibilities are:
cudaMalloc
from host side to allocate as much global memory as you need in your __global__
function;Upvotes: 3