CUDA apps time out & fail after several seconds - how to work around this?

后端 未结 8 833
执念已碎
执念已碎 2020-11-27 13:59

I\'ve noticed that CUDA applications tend to have a rough maximum run-time of 5-15 seconds before they will fail and exit out. I realize it\'s ideal to not have CUDA applic

8条回答
  •  离开以前
    2020-11-27 14:39

    The solution I use is:

    1. Pass all information to device.
    2. Run iterative versions of algorithms, where each iteration invokes the kernel on the memory already stored within the device.
    3. Finally transfer memory to host only after all iterations have ended.

    This enables control over iterations from CPU (including option to abort), without the costly device<-->host memory transfers between iterations.

提交回复
热议问题