You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not possible at the moment, unfortunately. I recently open-sourced a new version of Emu (not yet published to Crates.io) with significant changes to improve robustness, ease-of-use, and performance. This new version, too, at the moment will use the first device found.
I believe single-GPU, single-threaded is a good default but here is an idea I have for allowing selection, concurrency-
#[gpu_use]fnmain(){letmut data = vec![0.0;1000];gpu_do!(load(data));gpu_do!(launch());for i in0..1000{
data[i] = data[i] + 0.1;}gpu_do!(read(data));}
#[gpu_use("nvidia","nvidia")]// initialize first 2 devices with names containing substring "nvidia"fnmain(){letmut a = vec![0.0;1000];letmut b = vec![0.0;1000];letmut c = vec![0.0;1000];gpu_do!(open(1));// specify that 2nd in initialized list should be used; if not specified, default is 1st in initialized list to be usedgpu_do!(load_async(a));gpu_do!(load_async(b));gpu_do!(load_async(c));// all of a, b, c can be loaded asynchronouslygpu_do!(await());// wait for all loading to finishgpu_do!(launch());// this could also be launch_async if we wanted to do something while running on GPUfor i in0..1000{
c[i] = a[i] + b[i];}gpu_do!(read_async(data));// reading can be async while we do some computation until we actually need the data}
Hello!
Is there currently any way to manually list and select the OpenCL device?
Thanks! :)
The text was updated successfully, but these errors were encountered: