Add an early check in WSL to detect when no supported GPU is available.
otherwise rocm_agent_enumerator will keep retrying rocminfo for one
minute, causing unnecessary delay.
Signed-off-by: Flora Cui <flora.cui@amd.com>
Co-authored-by: harkgill-amd <harkgill@amd.com>
Since wslinfo does not exist in docker running on wsl,
change the way to detect wsl environment.
Change-Id: I215eb985a227caeef47483cd51818c84bf1d8a4c
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
[ROCm/rocminfo commit: 22ed708c39]
When amdgpu is built into the kernel, /sys/module/amdgpu/initstate will not be created even when the driver is functional. However, test shows /sys/module/amdgpu will be present. Adding an additional check for /sys/module/amdgpu when /sys/module/amdgpu/instate is not present.
Change-Id: Ie5c67c7e1eff8ac1683b211aaec802d0d342aeeb
[ROCm/rocminfo commit: c6f7a17c85]
The command which would print warnings on some
platform. Redirect both stdout and stderr to
/dev/null while running the command.
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Change-Id: Ibc377681a31a14a3e306ab4fcb14d8d0c853fa86
[ROCm/rocminfo commit: d1efacb47f]
This includes detecting the running environment,
skipping kfd dependency check if in wsl platform
and disabling unavailable information on wsl.
V2: Use wslinfo to detect the environment.
V3: Add back some queries for wsl, as the not_supported
value shall be returned from hsa_runtime.
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Suggested-by: Tianci Yin <tianci.yin@amd.com>
Change-Id: I686d551c795cb5c5532591623022856f59512205
[ROCm/rocminfo commit: 049ab55393]
Add query to check whether DMAbuf export is supported on this system
Change-Id: I28caa87b67135d67ffcc94695e4656e7b691d259
[ROCm/rocminfo commit: 2d34dc31f2]
Currently, rocminfo will fail when executed inside a docker container
due to being unable to lsmod inside docker. This has impacts on
rocprofiler use.
Fix this behavior by querying initstate of the amdgpu module from
/sys/module/amdgpu instead. If initstate is marked "live" everything if
fine - error out with either "not loaded" (initstate file does not
exist) or "not live" (initstate file does not contain "live" string).
Change-Id: I6f2e9655942fd4cf840fd3f56b7d69e893fa84d7
[ROCm/rocminfo commit: 94b4b3f0a6]
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 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]
* 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]