Syllo / nvtop

GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
Other
7.95k stars 291 forks source link

[Meta] Support for Intel, Nouveau and radeon GPUs #106

Open Syllo opened 3 years ago

Syllo commented 3 years ago

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.

thesunexpress commented 2 years ago

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

BloodyIron commented 2 years ago

Ooooo!

el1-x commented 2 years ago

@Syllo any update on this?

zhuyifei1999 commented 2 years ago

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:

Syllo commented 2 years ago

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

thomas-zimmerman commented 2 years ago

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?

Syllo commented 2 years ago

@thomas-zimmerman I created #144 for your issue

Syllo commented 2 years ago

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

servesh commented 2 years ago

@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)?

Syllo commented 2 years ago

@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.

servesh commented 2 years ago

@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.

HTOgit commented 1 year ago

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

Syllo commented 1 year ago

@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

poltimmer commented 1 year ago

Are there any plans on adding apple silicon support?

HTOgit commented 1 year ago

@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?

qwertychouskie commented 1 year ago

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

Would be nice to have V3D supported as well.

sin-ack commented 6 months ago

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.