CUDA Error 101 with cudaMemPrefetchAsync Positioning
I am running these snippets on WSL using CUDA 12.1.
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 cudaMemPrefetchAsync
s?
And what’s the mechanism behind these?