nvtop icon indicating copy to clipboard operation
nvtop copied to clipboard

[Meta] Support for Intel, Nouveau and radeon GPUs

Open Syllo opened this issue 3 years ago • 17 comments

I am opening this up because of this thread of discussion on the intel-sgx mailing list.

It seems that the GPU utilization for AMD and Intel will be available in future kernels, at least for the processes spawned by the user itself.

Marking this as a possible improvement once the support lands into the mainline kernel.

Syllo avatar May 21 '21 09:05 Syllo

Might be a better idea to just call it ' gputop ' instead then...

thesunexpress avatar Sep 17 '21 06:09 thesunexpress

Ooooo!

BloodyIron avatar Oct 26 '21 20:10 BloodyIron

@Syllo any update on this?

el1-x avatar Dec 30 '21 02:12 el1-x

Kernel support for AMDGPU is mainline since 5.14 (https://github.com/torvalds/linux/commit/874442541133f78c78b6880b8cc495bab5c61704), which was released August 29 2021, so if you have 5.14+ (most likely 5.15 LTS) you can try out my PR above.

i915 changes are still not mainline. Though Intel people are gonna use this gputop name if we don't grab it first :wink:

zhuyifei1999 avatar Mar 22 '22 14:03 zhuyifei1999

I will keep this issue around as a meta-issue to centralize the information on other vendors / driver support.

Syllo avatar Apr 18 '22 10:04 Syllo

I'm on a 5.17.4 kernel with a RX 6700 XT AMD GPU and the output that I get is:

No GPU to monitor.

This is on Ubuntu 22.04 with nvtop_1.2.2-1_amd64.deb. I built from source(123908faff9c8ff4f8cba5ec7d4ba365c42610fc) and I get the same output. Any thing I should run to get output on what's missing on this kernel to get output?

thomas-zimmerman avatar Apr 22 '22 23:04 thomas-zimmerman

@thomas-zimmerman I created #144 for your issue

Syllo avatar Apr 23 '22 08:04 Syllo

The Intel sysfs change has been proposed for Linux 5.19: https://lore.kernel.org/dri-devel/Ymkfy8FjsG2JrodK@tursulin-mobl2/

Syllo avatar Apr 28 '22 18:04 Syllo

@Syllo Would there be any interest in adding support for Intel GPUs via level zero Sysman interface (https://spec.oneapi.io/level-zero/latest/sysman/PROG.html)?

servesh avatar May 23 '22 22:05 servesh

@servesh Thanks for the link. I was not aware that oneAPI provided such library. This seems like a good opportunity to simplify the accelerator discovery and query. I'll see if I can make this work.

Syllo avatar Jun 11 '22 11:06 Syllo

@Syllo Sure, Iet me know once you have something that I can test and take a look. Happy to contribute to the code base as well.

servesh avatar Jun 13 '22 13:06 servesh

@Syllo Is it possible to show RX/TX on AMD GPUs? I'm on Linux 5.19.

HTOgit avatar Oct 26 '22 15:10 HTOgit

@HTOgit The support for the pcie_bw file is in place. However this file is empty on the system I am testing (RX 6800XT, Kernel 5.19.6).

The only explanation that I see is that the support has not been implemented in the driver:

I created a feature request for this here

Syllo avatar Oct 30 '22 10:10 Syllo

Are there any plans on adding apple silicon support?

poltimmer avatar Apr 07 '23 07:04 poltimmer

@HTOgit The support for the pcie_bw file is in place. However this file is empty on the system I am testing (RX 6800XT, Kernel 5.19.6).

The only explanation that I see is that the support has not been implemented in the driver:

* The function that populates the `pcie_bw` file is [amdgpu_get_pcie_bw](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/pm/amdgpu_pm.c#L1558)

* The Navi implementation seems to be in [soc21.c](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc21.c) but the function `get_pcie_usage` that is required by `amdgpu_get_pcie_bw` is not registered in [soc21_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc21.c#L512) contrary to [soc20_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc15.c#L883) and [vega20_asic_funcs](https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/amd/amdgpu/soc15.c#L905).

I created a feature request for this here

Sorry for not following up on the issue.

Are there any news to the topic? AMD announced to expose PCIe information to user space with Linux6.3 (https://www.phoronix.com/news/Linux-6.3-AMDGPU-New-uAPI). Would this help?

HTOgit avatar Apr 12 '23 09:04 HTOgit

https://www.phoronix.com/news/Raspberry-Pi-GPU-Stats-Report

Would be nice to have V3D supported as well.

qwertychouskie avatar Aug 15 '23 22:08 qwertychouskie

On kernel 6.7.4, when I run text-generation-webui, the "TYPE" field only shows "Graphic" and the GPU usage is always 0%:

image

The same program on an Nvidia GPU shows up correctly as "Compute" and I can see the GPU usage fine.

sin-ack avatar Mar 04 '24 06:03 sin-ack