How do you know when cudaMemcpyFromSymbol is finished?

I have a case where I have to put a dummy delay between cudaMemcpyFromSymbol and the continuation of my program to give the time to cudaMemcpyFromSymbol to finished its job.
Is there a function like cudaThreadSynchronize(); that can insure the copy is completed?

That is a blocking function, when it returns, the copy is done. It is only the asynchronous versions of the runtime API memory copy functions that require an explicit synchronization event to be certain they have completed.

Thank you,
I just check with assert and the function return cudaSuccess. This means that my calling function is not completed when I proceed to the next call in my main program. I have to find a way to verify completion instead of inserting a dummy wait period.

No it doesn’t. If cudaCopyFromSymbol returns 0, the copy completed successfully.

I mean cudaSuccess == 0 if cudaError_t is define.

I just change my calling function type to int instead of void and added return(0);

The function completes with error = 0 but I still have to add the delay for the next part of the program to work. Maybe the problem is still higher up the chain.