I have a question: if I allocate 1 matrix 2D and I have it in the GPU mempi and I have 2 kernels Use the same matrix, is it possible that I do not have the matrix again for the 2 matrix? And if this matrix is again automatic mempi for Kernel 2, will it take time to remix again?
If you want to use it, you do not need to transfer the data twice from the host 2 Once you transfer it to the kernel, it is in the GPU memory and as long as your program does not end (or you explicitly use DOLX like cudaFree
) Will be there
Simply pass the pointer to the field / matrix for both the kernel, if first modifies the kernel data and the second kernel runs in later (after the first kernel has finished), the second kernel will see modified data.
No comments:
Post a Comment