How to specify GPU devices for parallel computing using "parfor"?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ts
el 20 de Dic. de 2021
Comentada: ts
el 20 de Dic. de 2021
I have a workstation with four GPUs, and I want to run a parfor loop using specific two or three GPUs to share the workstation with other users. If you know how to specify gpu devices for parallel computing using "parfor", I would appreciate it if you could let me know.
0 comentarios
Respuesta aceptada
Edric Ellis
el 20 de Dic. de 2021
The documentation here describes how you might do this in general. Things get a little more complicated if you want to run more workers than the number of GPUs you're accessing, but the principle is the same - set things up using gpuDevice inside an spmd block. That then sets the GPU in use by the worker process, and parfor loops will continue to use that device.
Más respuestas (0)
Ver también
Categorías
Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!