question about resume kernel execution

Hi all,

I have a program like this:

  1. executing kernel1, when finished a certain quantity of work, stop it, and save the context related info (include all necessary info for resume the kernel) from shared memory to global memory (which is allocated before in host function).

  2. run kernel2 for several times.

  3. run kernel1 again, in global function of kernel1, copy the context related info from global memory to shared memory again to restore the running environment.

My problem is:

all context related info could be copied and used correctly when kernel1 is resumed, however, the pointer (point to a address of global memory which allocated for kernel1 in host function, this buffer of global memory is allocate at the beginning of the program, and only be destroyed at the exact end of program, during running time of kernel1 and kernel2, this buffer exist normally, and kernel2 will not use this buffer.) could not be used.

I compared the pointer values of the two times of running of kernel1, they looks same. I compared the buffer the pointer points to, they are unchanged by kernel2.

Does anybody know what the reason is?

Thanks in advance~


Hi Susan,

How did you save the context (function API Driver?) and what informations are saved and are necessary to restore that context after having Pop it? How can you quantify the amount of memory necessary for saving a context?