tracel-ai / burn

Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals.
https://burn.dev
Apache License 2.0
8.53k stars 421 forks source link

Can not choose second gpu using wgpu #655

Open Quackdoc opened 1 year ago

Quackdoc commented 1 year ago

Describe the bug When using the wgpu backend on windows (not yet tested on linux) I cannot set the wgpu backend

To Reproduce

Steps to reproduce the behaviour:

  1. Download and setup whisper-burn
  2. verify working on primary gpu
  3. set WGPU_ADAPTER_NAME = 'intel' to secondary gpu
  4. run and still uses primary
  5. change let device = WgpuDevice::BestAvailable; to let device = WgpuDevice::DiscreteGpu(1); (also try DiscreteGpu(0) for completeness)
  6. try again and still uses primary gpu

Expected behavior Use the secondary gpu

Screenshots Not applicable

Desktop (please complete the following information):

Additional context

I was able to successfully override by setting type Backend = WgpuBackend<burn_wgpu::Vulkan, f32, i32>; and using VK_ICD_FILENAME to forcibly load only the intel gpu. this is not a viable workaround however since it will not work with homogeneous gpu vendors. This may however work with setting primary gpu in windows settings, it's something I forgot to test.

original issue reported here: https://github.com/Gadersd/whisper-burn/issues/7

nathanielsimard commented 1 year ago

The intel GPU is probably an integrated gpu, can you try WgpuDevice::IntegratedGpu(0) instead?

Quackdoc commented 1 year ago

That didn't work either, Though I am running an Arc A380, I did play with the windows could be reporting it as integrated (and I suppose it still could be) It still runs on the primary AMD RX580 gpu instead of the Intel A380.