Syllo / nvtop

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

[question] Transfer perspective #220

Open Infinoid opened 1 year ago

Infinoid commented 1 year ago

Stupid question:

In the Device section, where it says RX: and TX:, does RX mean "data received by the GPU from the host", or "data received by the host from the GPU"? In other words, which perspective are these stats coming from, host or GPU? It seems like both would be valid in this context.

I wasn't able to find this detail in documentation, and after looking through code, it still isn't clear.

Infinoid commented 1 year ago

I think I've answered this question for myself.

I wrote this stupid script, which copies data from GPU memory to host:

#!/usr/bin/env python3

import cupy as cp

bufshape = [128, 128, 128, 128] # 256k elements * 4 (for float32) = 1GB
dtype = cp.float32
cbuf = cp.zeros(bufshape, dtype=dtype)

print("copying ctoh")
for i in range(1000):
    hbuf = cp.asnumpy(cbuf)

While running it, nvtop shows: RX: 0.000 KiB/s TX: 6.372 GiB/s

So these stats are from the GPU's perspective. RX is data received by the GPU from the host, and TX is data sent by the GPU to the host.

I wasn't able to find descriptions of the individual fields anywhere in the docs, so I'm not sure where a detail like this could be added.

Infinoid commented 1 year ago

These stats probably also include transfers from one GPU to another GPU, though I didn't test that.

sherwoac commented 10 months ago

while we're here, who thinks it'd be good to be able to add these RX/TX numbers to the graph?