The PCI ID backup method in rocm_agent_enumerator, where the
tool uses lspci to find all AMD GPU devices in the system and
manaully match them to gfx version, is extremely outdated. The
PCI ID list did not include anything after Vega 10, and the
actual call to lspci no longer returned anything due to some
missing conversions.
The patch adds all GPUs that might be needed by ROCr up through
Navy Flounder. The PCI ID to gfx matching pulls from the amdgpu
driver and libhsakmt.
Change-Id: I58b77bb6aa631f575352fc444d2542f265909706
[ROCm/rocminfo commit: ea5ce46fb4]
rocminfo uses lsmod to check for loaded drivers. Use of sysfs is
possible but sysfs' stable interface does not allow for easy parsing.
Use of lsmod avoids needing to walk the sysfs tree and avoids issues
of permissions to examine sysfs.
Both Debian and Fedora list lsmod under kmod. Presumption is that
CentOS and RHEL also follow this.
Change-Id: Ic5033e0b780100c54d2fe0b4f501c40acbc237fb
[ROCm/rocminfo commit: 2b4b0c8862]
Package should depend on hsa-rocr, not hsa-rocr-dev. Also
Remove negative path for dependency rocm-core (unconditional add +
conditional remove simplified to conditional add).
Change-Id: I6ead202f4f3f2f77b1da2ffed77feee956caf2e9
[ROCm/rocminfo commit: 86560046de]
Cmake manages CMAKE_CXX_FLAGS in standard ways from user inputs,
env vars, and target properties. Use target properties for our
options and let cmake handle the rest.
Change-Id: I20ef738e4df7880258d770f4ec13c09d8b323fba
[ROCm/rocminfo commit: e32a4d9bed]
JIRA : SWDEV-234471
With this change rocminfo exe shall be created using using hsa-runtime64::hsa-runtime64 which
internally decides whether static or shared libs based on its cmake build options
S. Keely:
Update patch to use find_package for rocr dependency.
Removed deadcode now supported by find_package.
Removed "hsa/" prefix from include statements since find_package
points to the target (ie rocr) include directory.
Removed typedef on structs due to new clang-11 warning.
Adapting to the comments : Removed PATHS for hsa find_package
Change-Id: I1ec65cdbce3085e44f1839da196eb4ae5c9ff30d
[ROCm/rocminfo commit: 605b3a5105]
On Ubuntu 20.04, there is no more python or python2. Currently I get
this: /usr/bin/env: ‘python’: No such file or directory
Change-Id: Ib310b8aa7c1bd62973ef3cc8bcaf571831ad4435
[ROCm/rocminfo commit: 5d6be5b808]
On newer kernels, it seems the group was changed from "video" to
"render". The check for video group misled me for quite some time, so
relax this check. Rather than specifically checking for video group
ownership, first see if /dev/kfd can be open as read-write. Then
diagnose whether the user belongs to the group that owns it, rather
than hardcoding the video group.
Change-Id: I9e65427363e9a5cdba802e09cee2f40fb80520ed
[ROCm/rocminfo commit: cd4b7cea85]
CACHE variables allow for variables to be documented, and
ROCR_LIB_DIR/ROCR_INC_DIR should be overridable as they'll
have different values on different Linux distributions.
Change-Id: I0bba633c184df2da55bdbe6aabbd53346d098b83
[ROCm/rocminfo commit: 04dc08664e]
* Continue with rocminfo even if video and kfd check fail.
* Color code informational lines (white) and warnings (red)
Change-Id: I739034c932fffca0924abc93ae9a929664a3e182
[ROCm/rocminfo commit: 141592e4f3]
This is a python port of rocm_agent_enumerator, which is used by HIP/HCC to
determine available AMDGPU targets on a system.
Its previous implementation was written in C++ which makes it somewhat hard to
deploy onto different distros / architectures. A python port should remove such
issue.
[ROCm/rocminfo commit: 8b018900f6]