When I render my image, it stops, giving the error message "CUDA ERROR: Launch failed in cuCtxSynchronize() Line 1372", then when I try to start the render again, I get the error message "cuCtxCreate: Launch failed" all the answers I have seen say to update your graphics card driver, however, mine is up to date. I have a GTX1080 with 4gb of RAM.
Bumped into the same error once.
Found following thread at developers forum:
Then it occurred to me that the Gforce Experience runs in the background (and being in my opinion, not a well written program) may be overlapping the memory of Blender or at least hogging the memory. So I un-installed it and magic! All Cuda errors and memory errors went away. Blender works again as it should!
I used to have this error, till i lower my render tile sizes to a value, that is lower than my output image size, my output image was "1920*1080" so i made my tile size 500 by 500.
and if you have the option "square samples" ticked, then untick it.
From my experience the problem is from either the tile size or the square samples or both
hope that works.