* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocminfo/files/
@ 2020-08-30 20:04 Craig Andrews
0 siblings, 0 replies; 2+ messages in thread
From: Craig Andrews @ 2020-08-30 20:04 UTC (permalink / raw
To: gentoo-commits
commit: 9fce8eb0fc30b03961cbc6f78c68fefab77d5d2e
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Aug 28 16:46:41 2020 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 20:04:51 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fce8eb0
dev-util/rocminfo: remove unused patch(es)
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
.../files/rocminfo-2.6.0-cmake-variables.patch | 31 ----------------------
.../rocminfo/files/rocminfo-2.7.0-sizeof.patch | 23 ----------------
2 files changed, 54 deletions(-)
diff --git a/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch b/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch
deleted file mode 100644
index 1678f504327..00000000000
--- a/dev-util/rocminfo/files/rocminfo-2.6.0-cmake-variables.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://github.com/RadeonOpenCompute/rocminfo/pull/17
-
-From c9bfc4b3db029b8502f900cd9bb545a675ca0898 Mon Sep 17 00:00:00 2001
-From: Craig Andrews <candrews@integralblue.com>
-Date: Thu, 25 Jul 2019 17:59:51 -0400
-Subject: [PATCH] Use CACHE variables, allow overriding
- ROCR_LIB_DIR/ROCR_INC_DIR
-
-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.
----
- CMakeLists.txt | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b5fa9dd..f8f430f 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -43,9 +43,10 @@ endif()
- #
-
- # Required Defines first:
--
--set(ROCR_INC_DIR ${ROCM_DIR}/include)
--set(ROCR_LIB_DIR ${ROCM_DIR}/lib)
-+set(ROCRTST_BLD_BITS CACHE "64" STRING "Either 32 or 64")
-+set(ROCM_DIR CACHE PATH "Root for RocM install")
-+set(ROCR_INC_DIR ${ROCM_DIR}/include CACHE PATH "Path for RocM includes")
-+set(ROCR_LIB_DIR ${ROCM_DIR}/lib CACHE PATH "Path for RocM libraries")
- #
- # Determine ROCR Header files are present
- #
diff --git a/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch b/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch
deleted file mode 100644
index 2d96bb22779..00000000000
--- a/dev-util/rocminfo/files/rocminfo-2.7.0-sizeof.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From cf96f42165fe76b98f653f979b4c182279dcac64 Mon Sep 17 00:00:00 2001
-From: Wilfried Holzke <gentoo@holzke.net>
-Date: Fri, 16 Aug 2019 22:04:52 +0200
-Subject: [PATCH] Fixed sizeof(err_val) to return the number of characters in
- the array
-
----
- rocminfo.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rocminfo.cc b/rocminfo.cc
-index 9fddcfb..ee20da8 100755
---- a/rocminfo.cc
-+++ b/rocminfo.cc
-@@ -72,7 +72,7 @@
- char* err_str = NULL; \
- if (hsa_status_string(err, \
- (const char**)&err_str) != HSA_STATUS_SUCCESS) { \
-- snprintf(&(err_val[0]), sizeof(err_val[12]), "%#x", (uint32_t)err); \
-+ snprintf(&(err_val[0]), sizeof(err_val), "%#x", (uint32_t)err); \
- err_str = &(err_val[0]); \
- } \
- printf("%shsa api call failure at: %s:%d\n", \
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/rocminfo/files/
@ 2024-06-30 0:00 Conrad Kostecki
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2024-06-30 0:00 UTC (permalink / raw
To: gentoo-commits
commit: cdebd09be211e1ca508b26b834502ba877b30445
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Jun 29 09:18:59 2024 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Jun 29 23:56:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdebd09b
dev-util/rocminfo: remove unused patches
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
.../rocminfo-5.1.3-detect-builtin-amdgpu.patch | 50 ----------
.../rocminfo-5.5.1-detect-builtin-amdgpu.patch | 105 ---------------------
.../files/rocminfo-6.0.0-python-3-12-support.patch | 34 -------
3 files changed, 189 deletions(-)
diff --git a/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch
deleted file mode 100644
index 5d0b2ed284bd..000000000000
--- a/dev-util/rocminfo/files/rocminfo-5.1.3-detect-builtin-amdgpu.patch
+++ /dev/null
@@ -1,50 +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
-From ea4f017ed035928b1970e2589b02ec9b348c863e Mon Sep 17 00:00:00 2001
-From: YiyangWu <xgreenlandforwyy@gmail.com>
-Date: Wed, 18 Aug 2021 21:05:20 +0800
-Subject: [PATCH] Check /sys/module/amdgpu for ROCk instead of lsmod
-
-Closes: #42
-
-Signed-off-by: YiyangWu <xgreenlandforwyy@gmail.com>
----
- rocminfo.cc | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/rocminfo.cc b/rocminfo.cc
-index 871f406..58c847d 100755
---- a/rocminfo.cc
-+++ b/rocminfo.cc
-@@ -995,6 +995,8 @@ AcquireAndDisplayAgentInfo(hsa_agent_t agent, void* data) {
- err = AcquireAgentInfo(agent, &agent_i);
- RET_IF_HSA_ERR(err);
-
-+ std::string ind(kIndentSize, ' ');
-+
- printLabel("*******", true);
- std::string agent_ind("Agent ");
- agent_ind += std::to_string(*agent_number).c_str();
-@@ -1031,16 +1033,16 @@ 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);
- }
-- pclose(fd);
-
- // Check if user belongs to the group for /dev/kfd (e.g. "video" or
- // "render")
diff --git a/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch b/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch
deleted file mode 100644
index dd1aefe4df4f..000000000000
--- a/dev-util/rocminfo/files/rocminfo-5.5.1-detect-builtin-amdgpu.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 3a4d533a1e2a179ad873c480dc4a42ea23681263 Mon Sep 17 00:00:00 2001
-From: Mike Li <Tianxinmike.Li@amd.com>
-Date: Wed, 17 Aug 2022 11:44:09 -0400
-Subject: [PATCH 1/2] Check permission and handle PermissionError exception
-
-Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
-Change-Id: If7cb8464d0b761e4be45c85eb7147ceed609da61
----
- rocm_agent_enumerator | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/rocm_agent_enumerator b/rocm_agent_enumerator
-index 6264a5f..ceb9e11 100755
---- a/rocm_agent_enumerator
-+++ b/rocm_agent_enumerator
-@@ -195,10 +195,15 @@ def readFromKFD():
- node_path = os.path.join(topology_dir, node)
- if os.path.isdir(node_path):
- prop_path = node_path + '/properties'
-- if os.path.isfile(prop_path):
-+ if os.path.isfile(prop_path) and os.access(prop_path, os.R_OK):
- target_search_term = re.compile("gfx_target_version.+")
- with open(prop_path) as f:
-- line = f.readline()
-+ try:
-+ line = f.readline()
-+ except PermissionError:
-+ # We may have a subsystem (e.g. scheduler) limiting device visibility which
-+ # could cause a permission error.
-+ line = ''
- while line != '' :
- search_result = target_search_term.search(line)
- if search_result is not None:
-
-From 94b4b3f0a66eb70912177ca7076b4267f8b5449b Mon Sep 17 00:00:00 2001
-From: Johannes Dieterich <johannes.dieterich@amd.com>
-Date: Mon, 21 Nov 2022 18:09:55 +0000
-Subject: [PATCH 2/2] Fix rocminfo when run within docker environments
-
-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
----
- rocminfo.cc | 30 ++++++++++++++++++++++++------
- 1 file changed, 24 insertions(+), 6 deletions(-)
-
-diff --git a/rocminfo.cc b/rocminfo.cc
-index 0842d57..8ed9111 100755
---- a/rocminfo.cc
-+++ b/rocminfo.cc
-@@ -51,6 +51,7 @@
- #include <unistd.h>
- #include <pwd.h>
-
-+#include <fstream>
- #include <vector>
- #include <string>
- #include <sstream>
-@@ -1039,16 +1040,33 @@ 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) {
-+
-+ std::ifstream amdgpu_initstate("/sys/module/amdgpu/initstate");
-+ if (amdgpu_initstate){
-+ std::stringstream buffer;
-+ buffer << amdgpu_initstate.rdbuf();
-+ amdgpu_initstate.close();
-+
-+ std::string line;
-+ bool is_live = false;
-+ while (std::getline(buffer, line)){
-+ if (line.find( "live" ) != std::string::npos){
-+ is_live = true;
-+ break;
-+ }
-+ }
-+ if (is_live){
-+ printf("%sROCk module is loaded%s\n", COL_WHT, COL_RESET);
-+ } else {
-+ printf("%sROCk module is NOT live, possibly no GPU devices%s\n",
-+ COL_RED, COL_RESET);
-+ return -1;
-+ }
-+ } else {
- 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);
- }
-- pclose(fd);
-
- // Check if user belongs to the group for /dev/kfd (e.g. "video" or
- // "render")
diff --git a/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch b/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch
deleted file mode 100644
index 2b14e42e4705..000000000000
--- a/dev-util/rocminfo/files/rocminfo-6.0.0-python-3-12-support.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Fix "SyntaxWarning: invalid escape sequence" SyntaxWarning in python 3.12+
-Bug: https://github.com/ROCm/rocminfo/issues/69
---- a/rocm_agent_enumerator
-+++ b/rocm_agent_enumerator
-@@ -92,7 +92,7 @@ def getGCNISA(line, match_from_beginning = False):
- return result.group(0)
- return None
-
--@staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?"))
-+@staticVars(search_name=re.compile(r"gfx[0-9a-fA-F]+(:[-+:\w]+)?"))
- def getGCNArchName(line):
- result = getGCNArchName.search_name.search(line)
-
-@@ -149,9 +149,9 @@ def readFromROCMINFO(search_arch_name = False):
-
- # search AMDGCN gfx ISA
- if search_arch_name is True:
-- line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)")
-+ line_search_term = re.compile(r"\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)")
- else:
-- line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)")
-+ line_search_term = re.compile(r"\A\s+Name:\s+(gfx\d+)")
- for line in rocminfo_output:
- if line_search_term.match(line) is not None:
- if search_arch_name is True:
-@@ -172,7 +172,7 @@ def readFromLSPCI():
- except:
- lspci_output = []
-
-- target_search_term = re.compile("1002:\w+")
-+ target_search_term = re.compile(r"1002:\w+")
- for line in lspci_output:
- search_result = target_search_term.search(line)
- if search_result is not None:
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-30 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-30 20:04 [gentoo-commits] repo/gentoo:master commit in: dev-util/rocminfo/files/ Craig Andrews
-- strict thread matches above, loose matches on Subject: below --
2024-06-30 0:00 Conrad Kostecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox