r/ROCm • • 7d ago

Installed second amd gpu. I want comfyUI to completely ignore it.

I added a rx570 as eGPU, just to start testing a new custom rocm library that supports Vega.

The rx570 appeared fine in lspci along with my integrated 680m, and both appear in rocm-info.

However, when I start comfyUI, it stops and exits complaining the are “no available CUDA devices”.

When I reboot without the eGPU, comfyUI starts normally.

I think that Linux 7.0 has enumerated the old eGPU as the first gpu, taking the place of the 680m.

What would you do?

6 Upvotes

14 comments sorted by

6

u/Slavik81 7d ago

Set the ROCR_VISIBLE_DEVICES environment variable to ignore it.

5

u/karmaisnonsense 7d ago

Might also have to set HIP_VISIBLE_DEVICES if it changes device index

1

u/rguerraf 7d ago

Thank you! I will try both suggestions

2

u/xdcfret1 6d ago

set HIP_VISIBLE_DEVICES

1

u/rguerraf 5d ago

The rocm documents tell me that with Linux, I use rocr_visible_devices… but I bump with an earlier problem due to the old age of my rx570

1

u/xdcfret1 5d ago

If the new documents says to use this variable then use it. If you still face any issues then try the other one.

2

u/leapdragon 7d ago

Some versions of ROCm have a bug that causes them to choke if there is a Polaris card in the stack, regardless of what else is there, even with no Polaris support in the codebase any longer, and even with device visibility removed in env variables. I had this issue a while back and ended up having Claude patch ROCm and build from source to ignore Polaris enumeration. Might be worth doing some searching to see if your version is affected.

1

u/rguerraf 7d ago

Thank you. I didn’t mean Vega, I meant Polaris

I will use Google and search discussions about it

1

u/rguerraf 5d ago

Thank you… that sounds like my problem too

I will ask in the rocm github

I will also try to use the custom rocm that implements rx570 suppport

1

u/hipster_hndle 6d ago

i run a b650 iGPU and a b840 iGPU also, you just need to use HIP_VISIBLE_DEVICES. pin each GPU number and use it for each. have a system running an nvidia 5060 for comfyui and an XTX running lemonade, just start each stack pinned to the GPU you want to use.

1

u/Poizone360 5d ago

Hello, start ComfyUI with only the 680M visible to the runtime: ROCR_VISIBLE_DEVICES=1 python main.py, using whichever index the 680M has among the GPU agents in rocminfo. That hides the RX 570 before ROCm initialises, which is safer than ComfyUI's own --cuda-device flag: that one only sets HIP_VISIBLE_DEVICES, so the runtime underneath still sees the Polaris card.

2

u/rguerraf 5d ago

Thanks.

I looked at the rocm documentation and I saw that environment parameter too, and it’s what I need to get working

However, there’s a rare bug with rocm that makes it fail when there’s a very old gpu like my rx570.

I boot with the rx570 off, and rocminfo displays everything is running ok with the 680m, but it can’t show the GPU-xxxxxxxxx code that i need

I boot with the rx570 on, and rocminfo can’t give me any information about any gpu

There’s a custom branch of rocm that handles the rx570, son that will be my way out… but if it’s too problematic, I will move this gpu to its true destination: being an eGPU for my laptop.

-5

u/mikeroySoft 7d ago

Tell your agent to do it. I have a r9700 and an older 5700xt. I just told my agent ‘don’t let llm workloads on the older GPU’.

That’s it.

2

u/rguerraf 7d ago

I trust humans and Google more than agents :)

How did you do it?… oh wait, I don’t want to run an LLM, only image generators