Skip to content
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

Expose marketing name #2

Closed
cromefire opened this issue Nov 26, 2023 · 5 comments
Closed

Expose marketing name #2

cromefire opened this issue Nov 26, 2023 · 5 comments

Comments

@cromefire
Copy link

cromefire commented Nov 26, 2023

Right now the library only exposes the chip id as a name (in my case for example 0x744c), while for me it would be far more interesting to have the markieting name, wich you could actually display to a user (I want to use the library only to display hardware that's being detected by ROCm, the actual usage of ROCm is by a C library I build against).

Output from rocminfo:

*******                  
Agent 2                  
*******                  
  Name:                    gfx1100                                       
  Marketing Name:          Radeon RX 7900 XTX                 
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                          
  Queue Min Size:          64(0x40)                           
  Queue Max Size:          131072(0x20000)                    
  Queue Type:              MULTI                              
  Node:                    1                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      32(0x20) KB                        
    L2:                      6144(0x1800) KB                    
    L3:                      98304(0x18000) KB                  
  Chip ID:                 29772(0x744c)

Any way that's possible to add to the Identifiers struct?

@PTFOPlayer
Copy link
Owner

Feel free to make PR, i will make lookup tables for some more popular models in future but currently i can output only data that i can get from rocm_smi for C.

@cromefire
Copy link
Author

cromefire commented Nov 26, 2023

As the rocminfo CLI already has that info, I'd think it's available via C, right? (no lookup table needed) I do not know the API at all tough.

@PTFOPlayer
Copy link
Owner

I'll look closer into api and figure it out

@cromefire
Copy link
Author

cromefire commented Nov 26, 2023

Okay found the API in libdrm_amdgpu (which is kinda part of ROCm as well). Is that still in scope for the project?
https://gitlab.freedesktop.org/mesa/drm/-/blob/main/amdgpu/amdgpu.h#L1526

Which rocminfo links agains:

~$ ldd /usr/bin/rocminfo
	linux-vdso.so.1 (0x00007ffc68dcf000)
	libhsa-runtime64.so.1 => /opt/rocm-5.7.0/lib/libhsa-runtime64.so.1 (0x00007fe9d4a00000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe9d4600000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe9d4d22000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe9d4200000)
	libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007fe9d4d04000)
	libdrm.so.2 => /opt/amdgpu/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fe9d4ce8000)
	libdrm_amdgpu.so.1 => /opt/amdgpu/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1 (0x00007fe9d4cda000)
	libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007fe9d4ccd000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe9d4919000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe9d4d6d000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe9d48fd000)

@PTFOPlayer
Copy link
Owner

okey thanks i will look into that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants