diff options
Diffstat (limited to 'dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch')
-rw-r--r-- | dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch deleted file mode 100644 index a01eb3ec3909..000000000000 --- a/dev-util/rocminfo/files/rocminfo-4.3.0-detect-builtin-amdgpu.patch +++ /dev/null @@ -1,25 +0,0 @@ -/sys/module/amdgpu instead of lsmod for builtin amdgpu kernel module - -https://github.com/RadeonOpenCompute/rocminfo/pull/43 -https://github.com/RadeonOpenCompute/rocminfo/issues/42 ---- a/rocminfo.cc -+++ b/rocminfo.cc -@@ -1035,14 +1035,15 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) { - - int CheckInitialState(void) { - // Check kernel module for ROCk is loaded -- FILE *fd = popen("lsmod | grep amdgpu", "r"); -- char buf[16]; -- if (fread (buf, 1, sizeof (buf), fd) <= 0) { -+ int module_dir; -+ module_dir = open("/sys/module/amdgpu", O_DIRECTORY); -+ if (module_dir < 0) { - printf("%sROCk module is NOT loaded, possibly no GPU devices%s\n", - COL_RED, COL_RESET); - return -1; - } else { - printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET); -+ close(module_dir); - } - - // Check if user belongs to the group for /dev/kfd (e.g. "video" or |