Question

I am designing a multi-gpu cuda code but I still don't have the machinary to actually develop the code. So, until I do,

Do you know if there is someway to emulate a multiple gpu enviroment just by using one gpu?

I suppose that such a thing, if it exists, would be very limited but it would allow me to test my ideas until I get the hardware I want.

Thanks!

Was it helpful?

Solution

Something close can be approximated using the CUDA Driver API (cuCtxCreate, cuCtxSetCurrent). See CUDA C Programming Guide Appendix G.4 Interoperability between Runtime and Driver API. Before calling any cuda* functions use cuCtxCreate to create two contexts on the device. Use cuCtxSetCurrent in place of cudaSetDevice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top