-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcie_bw
issue with AMDGPU support
#208
Comments
Nvtop shows B/KiB/MiB depending on how much data is being transferred. |
Umm, NVML returns the value in KiB/s, but the AMDGPU driver returns it in B/s (packet_count * max_payload_size[Byte]). Does P.S. |
Sorry I did not get what you meant the first time. Indeed the code was missing a division by 1024 to get in the kilobyte range, thanks. I pushed 04721e3 to fix it. Could you please elaborate on what is wrong with APU+dGPU? Are one, the other or both GPUs not found or missing info? |
Thanks.
|
Fixed by 3e9ddef
But the - received *= maxPayloadSize;
- transmitted *= maxPayloadSize;
+ // Compute received/transmitter in KiB
+ received *= maxPayloadSize / 1024;
+ transmitted *= maxPayloadSize / 1024; Also, the |
Oh my, I did not think hard enough about operator precedence in that case, thanks! So is reading the file pcie_bw blocking when nvtop reads it faster than the driver refresh rate (1sec)? I've been thinking about separating the data gathering and interface logic in two threads (and frankly should have done that from the start) but I have unfortunately little time to allocate to that right now. |
I'm not sure about blocking, but
I am not confident in safely using multithreading in C. |
nvtop
calculates PCIe bandwidth usage based on KiB/s, but the correct value is B/s.rocm_smi_lib
usesnumber_of_received * max_packet_size (max_payload_size) / 1024.0 / 1024.0
ornumber_of_sent * max_packet_size (max_payload_size) / 1024.0 / 1024.0
to calculate PCIe bandwidth usage (MiB/s).https://github.com/RadeonOpenCompute/rocm_smi_lib/blob/master/python_smi_tools/rocm_smi.py#L1862-L1883
Also,
pcie_bw
needs at least 1s to read a file because it usesmsleep(1000)
to count on the AMDGPU driver side.https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/amdgpu/vi.c#L1379
-d, --delay
option ofnvtop
will not work ifpcie_bw
is supported.I think we should have a separate thread for
pcie_bw
if possible.The text was updated successfully, but these errors were encountered: