Relative Content

Tag Archive for c++cudanvccunified-memory

Proper usage of cudaMemPrefetchAsync?

I am runing these snips under WSL using CUDA 12.1.
snip1 returns CUDA error 101: invalid device ordinal but snip2 runs well.
It it only because of the positions of cudaMemPrefetchAsyncs?
And what’s the mechanism behind these?