How to execute CUDA kernel on given GPU? -



How to execute CUDA kernel on given GPU? -

i have 2 nvidia cards on machine. want execute cuda kernel on 1 of them (for example, on second). alas, in tutorials didn't find device selection memory allocation , kernel execution, done opencl.

cannot tell me, how can take video device execute kernels , allocate memory on?

this looking for:

cudaerror_t cudasetdevice (int device)

link nvidia api documentation:

http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/docs/online/group__cudart__device_g418c299b069c4803bfb7cab4943da383.html

quote above link:

any device memory subsequently allocated host thread using cudamalloc(), cudamallocpitch() or cudamallocarray() physically resident on device. host memory allocated host thread using cudamallochost() or cudahostalloc() or cudahostregister() have lifetime associated device. streams or events created host thread associated device. kernels launched host thread using <<<>>> operator or cudalaunch() executed on device.

cuda

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -