-
|
It looks like CUDA can be much faster than --device cpu, especially as model size increases. At least one person has appeared to have success using an AMD consumer GPU (RX 6800). https://news.ycombinator.com/item?id=32933236 Options for --device appear to include: cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, ort, mps, xla, lazy, vulkan, meta, hpu, privateuseone I have the appropriate version of torch installed on Linux, but I'm not sure how to enable ROCm using --device |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 17 replies
-
|
We haven't tested ROCm, but from this documentation it seems that you can keep using
|
Beta Was this translation helpful? Give feedback.
-
|
If it supports ROCm, it will be great. |
Beta Was this translation helpful? Give feedback.
-
|
You can already use pytorch-rocm to take advantage of AMD GPUs. Install it through pip before installing openai |
Beta Was this translation helpful? Give feedback.
-
|
ROCm works fine with Whisper. I'm using it with "Radeon RX Vega (VEGA10, DRM 3.42.0, 5.15.0-48-generic, LLVM 12.0.0)". A few important steps in getting it working (i'm on Kubuntu 20.04.5 w/ kernel 5.15.0-56-generic , YMMV): (1) (6) Now install whisper and check "whisper --help" to see if it outputs: With my GPU, whisper outputs the following warning: MIOpen(HIP): Warning [SQLiteBase] Missing system database file: gfx900_56.kdb Performance may degrade. Please follow instructions to install: However I've seen suggestions that the above warning is spurious, and in either case, applies to the AMD proprietary drivers whereas I'm using the open-source default 'amdgpu' drivers. Anybody have further info on resolving this warning for open source 'amdgpu' users?? Will I see better performance using AMD's proprietary drivers?? ........ On a different system, I had the hare-brained idea of trying to use my AMD 4750G "APU" (Ryzen with integrated AMD GPU) with pytorch. In this case I ended up using the "nightly" ROCm build versions of "torch 2.0.0.dev20221219+rocm5" and torchaudio and torchvision suggested by https://pytorch.org/ . After much failure, trying a hint from https://stackoverflow.com/questions/73229163/amd-rocm-with-pytorch-on-navi10-rx-5700-rx-5700-xt , Note that without the env-var, whisper pukes: With the env-var, whisper claims cuda works: However running a transcription with most models runs out of memory and dumps core (bug that it dumps core??): With the 'base' or 'tiny' models, it no longer dumps core, but instead hangs forever at 100% CPU, outputting nothing. Furthermore, in this 'hung' state, whisper no longer can be ^C'd to kill the hanging process (bug?). Rather the process needs to be killed externally, or you need to background the process and then "kill %1" it. Note that radeontop(1) (from https://github.com/clbr/radeontop not apt) indicates how little memory is available on AMD 4750G with a running KDE desktop: (NB: i've also tried this AMD4750G APU system "headless" so that GPU is only used for whisper and not to run the KDE desktop, and it still hangs or crashes as above). And with that, I've given up on the AMD 4750G APU and continue to use my old Power-hog RxVega 56 (165W) with the 'medium' model quite successfully: https://www.youtube.com/watch?v=AFk5g7NJ1Ko https://rumble.com/v1n7cx8-trainspodder-and-whisper-transcribes-radio-w-good-proper-noun-spelling-infe.html In contrast, for the RxVega56 radeontop(1) reports (on a "headless" system where I'm using the GPU 100% for whisper). |
Beta Was this translation helpful? Give feedback.
-
|
Hijacking this thread, I had a hard time get things to work on docker. Please, consider that I know nothing, so there my be errors or unecessary steps on these files, but I took a long time to figure it out. You also need to install rocm drivers on your host machine first. First I suggest to get: |
Beta Was this translation helpful? Give feedback.
-
|
Here is a short description how to use Whisper with older AMD Cards (GFX803) RX 580 Yesterday I managed to get Whisper (or Whisper-WEBUI) start and running with GPU (GFX803) RX 580 (8GB). |
Beta Was this translation helpful? Give feedback.
We haven't tested ROCm, but from this documentation it seems that you can keep using
cudaif the ROCm version is properly installed.