5

I have a notebook with an Intel iGPU and a dedicated AMD GPU and I was told that by default the iGPU would be used, but that I can explicitly tell a program use the AMD GPU by running it like this

DRI_PRIME=1 example_program

I know that this works for glmark2 because it tells me in the terminal, but how can I verify this for any other process?

For nvidia GPUs there apparently is a utility called nvidia-smi, but I need something that works for AMD GPUs.

I'm using Fedora 34 in case it matters...

Forivin
  • 779
  • 5
  • 18
  • 37

2 Answers2

1

Depending on your GPU:

To see which process your Radeon uses, look for radeon-profile:

radeon-profile

X.LINK
  • 1,288
  • 9
  • 18
  • 1
    Please provide more detail. Non of the `radeontop` options make it show which process is using the GPU from what I can tell. – Forivin May 09 '21 at 21:43
  • Ok that's clearer now, I've updated my answer. – X.LINK May 10 '21 at 01:20
  • `radeon-profile` doesn't show anything for my AMD Vega GPU. – Forivin May 10 '21 at 10:20
  • Hmm, I don't know any other tools. You can to some extent do the same of what you want by looking at your iGPU usage with `intel-gpu-tools` and run your program with `radeon-profile`. If no iGPU usage shows up but your does on your whole Vega, you can be pretty sure that your program does not run on your iGPU. – X.LINK May 10 '21 at 11:47
0

Not sure, if this applicable to your case, but the following command helps to determine the CPU core a process with pid is executing:

ps -o pid,psr,cmd -p

Abhi
  • 1