fix the error libroctx64.so.o not found when executing MIOpenDriver (#47196)
This commit is contained in:
parent
6924c530e2
commit
0de6c17477
@ -0,0 +1,26 @@
|
|||||||
|
From bbfc08e034b80d8b8c6895cb74c38544ffa9a9b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
|
||||||
|
Date: Thu, 24 Oct 2024 14:01:27 +0000
|
||||||
|
Subject: [PATCH] link with roctracer when building miopendriver for 6.1.0
|
||||||
|
|
||||||
|
---
|
||||||
|
driver/CMakeLists.txt | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt
|
||||||
|
index 7d4fdbb..31de1ba 100644
|
||||||
|
--- a/driver/CMakeLists.txt
|
||||||
|
+++ b/driver/CMakeLists.txt
|
||||||
|
@@ -34,6 +34,9 @@ endif()
|
||||||
|
add_dependencies(MIOpenDriver generate_kernels)
|
||||||
|
target_include_directories(MIOpenDriver PRIVATE ../src/kernels)
|
||||||
|
target_link_libraries(MIOpenDriver MIOpen Threads::Threads)
|
||||||
|
+if(MIOPEN_USE_ROCTRACER)
|
||||||
|
+ target_link_libraries(MIOpenDriver ${rocTracer})
|
||||||
|
+endif()
|
||||||
|
if(NOT MIOPEN_EMBED_DB STREQUAL "")
|
||||||
|
target_link_libraries(MIOpenDriver $<BUILD_INTERFACE:miopen_data> )
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.39.3
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 5565f0bf0a8e7b8217ed1a943a4210fec303ec42 Mon Sep 17 00:00:00 2001
|
||||||
|
From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
|
||||||
|
Date: Thu, 24 Oct 2024 13:55:01 +0000
|
||||||
|
Subject: [PATCH] link with roctracer when building miopendriver
|
||||||
|
|
||||||
|
---
|
||||||
|
driver/CMakeLists.txt | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt
|
||||||
|
index 8f19a90..6c701d6 100644
|
||||||
|
--- a/driver/CMakeLists.txt
|
||||||
|
+++ b/driver/CMakeLists.txt
|
||||||
|
@@ -64,6 +64,9 @@ endif()
|
||||||
|
add_dependencies(MIOpenDriver generate_kernels)
|
||||||
|
target_include_directories(MIOpenDriver PRIVATE ../src/kernels)
|
||||||
|
target_link_libraries(MIOpenDriver MIOpen Threads::Threads roc::rocrand)
|
||||||
|
+if(MIOPEN_USE_ROCTRACER)
|
||||||
|
+ target_link_libraries(MIOpenDriver ${rocTracer})
|
||||||
|
+endif()
|
||||||
|
if(NOT MIOPEN_EMBED_DB STREQUAL "")
|
||||||
|
target_link_libraries(MIOpenDriver $<BUILD_INTERFACE:miopen_data> )
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.39.3
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 1693afd9690b97fcceff09ffce765712e3c7361a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
|
|
||||||
Date: Mon, 29 Apr 2024 08:01:47 +0000
|
|
||||||
Subject: [PATCH] Adding roctracer-dev include and library path
|
|
||||||
|
|
||||||
---
|
|
||||||
src/CMakeLists.txt | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index 0741a60..84b6805 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -739,6 +739,9 @@ if(WIN32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(MIOpen SYSTEM PUBLIC $<BUILD_INTERFACE:${HALF_INCLUDE_DIR}>)
|
|
||||||
+target_include_directories(MIOpen SYSTEM PUBLIC "${NLOHMANN_JSON_INCLUDE}")
|
|
||||||
+target_include_directories(MIOpen SYSTEM PUBLIC "${ROCTRACER_INCLUDE_DIR}")
|
|
||||||
+target_include_directories(MIOpen SYSTEM PUBLIC "${SQLITE_INCLUDE_DIR}")
|
|
||||||
# Workaround : change in rocm-cmake was causing linking error so had to add ${CMAKE_DL_LIBS}
|
|
||||||
# We can remove ${CMAKE_DL_LIBS} once root cause is identified.
|
|
||||||
target_link_libraries(MIOpen PRIVATE ${CMAKE_DL_LIBS} Threads::Threads BZip2::BZip2 ${MIOPEN_CK_LINK_FLAGS})
|
|
||||||
@@ -861,7 +864,7 @@ if(NOT WIN32 AND NOT APPLE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MIOPEN_USE_ROCTRACER)
|
|
||||||
- target_link_libraries(MIOpen PRIVATE roctx64)
|
|
||||||
+ target_link_libraries(MIOpen PRIVATE "${ROCTRACER_LIB_DIR}/libroctx64.so")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
############################################################
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -63,7 +63,8 @@ class MiopenHip(CMakePackage):
|
|||||||
|
|
||||||
patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:5.7")
|
patch("miopen-hip-include-nlohmann-include-directory.patch", when="@5.4.0:5.7")
|
||||||
patch("0002-add-include-dir-miopen-hip-6.0.0.patch", when="@6.0")
|
patch("0002-add-include-dir-miopen-hip-6.0.0.patch", when="@6.0")
|
||||||
patch("0002-add-include-dir-miopen-hip-6.1.0.patch", when="@6.1")
|
patch("0001-link-with-roctracer-when-building-miopendriver-6.1.0.patch", when="@6.1")
|
||||||
|
patch("0001-link-with-roctracer-when-building-miopendriver-6.2.0.patch", when="@6.2:")
|
||||||
patch(
|
patch(
|
||||||
"https://github.com/ROCm/MIOpen/commit/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
|
"https://github.com/ROCm/MIOpen/commit/f60aa1ff89f8fb596b4a6a4c70aa7d557803db87.patch?full_index=1",
|
||||||
sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
|
sha256="7f382c872d89f22da1ad499e85ffe9881cc7404c8465e42877a210a09382e2ea",
|
||||||
@ -135,7 +136,7 @@ class MiopenHip(CMakePackage):
|
|||||||
depends_on("nlohmann-json", type="link")
|
depends_on("nlohmann-json", type="link")
|
||||||
depends_on(f"rocmlir@{ver}", when=f"@{ver}")
|
depends_on(f"rocmlir@{ver}", when=f"@{ver}")
|
||||||
for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]:
|
for ver in ["6.0.0", "6.0.2", "6.1.0", "6.1.1", "6.1.2", "6.2.0", "6.2.1"]:
|
||||||
depends_on("roctracer-dev@" + ver, when="@" + ver)
|
depends_on(f"roctracer-dev@{ver}", when=f"@{ver}")
|
||||||
for ver in ["6.1.0", "6.1.1", "6.1.2"]:
|
for ver in ["6.1.0", "6.1.1", "6.1.2"]:
|
||||||
depends_on("googletest")
|
depends_on("googletest")
|
||||||
for ver in ["6.2.0", "6.2.1"]:
|
for ver in ["6.2.0", "6.2.1"]:
|
||||||
@ -200,19 +201,19 @@ def cmake_args(self):
|
|||||||
args.append(self.define("MIOPEN_USE_MLIR", "OFF"))
|
args.append(self.define("MIOPEN_USE_MLIR", "OFF"))
|
||||||
if self.spec.satisfies("@5.7.0:"):
|
if self.spec.satisfies("@5.7.0:"):
|
||||||
args.append(self.define("MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK", "OFF"))
|
args.append(self.define("MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK", "OFF"))
|
||||||
if self.spec.satisfies("@6:6.1"):
|
if self.spec.satisfies("@6.0"):
|
||||||
args.append(
|
args.append(
|
||||||
"-DROCTRACER_INCLUDE_DIR={0}".format(self.spec["roctracer-dev"].prefix.include)
|
"-DROCTRACER_INCLUDE_DIR={0}".format(self.spec["roctracer-dev"].prefix.include)
|
||||||
)
|
)
|
||||||
args.append("-DROCTRACER_LIB_DIR={0}".format(self.spec["roctracer-dev"].prefix.lib))
|
args.append("-DROCTRACER_LIB_DIR={0}".format(self.spec["roctracer-dev"].prefix.lib))
|
||||||
if self.spec.satisfies("@6.1"):
|
|
||||||
args.append("-DSQLITE_INCLUDE_DIR={0}".format(self.spec["sqlite"].prefix.include))
|
args.append("-DSQLITE_INCLUDE_DIR={0}".format(self.spec["sqlite"].prefix.include))
|
||||||
if self.spec.satisfies("@6.2:"):
|
if self.spec.satisfies("@6.1:"):
|
||||||
|
args.append(self.define("MIOPEN_USE_ROCTRACER", "ON"))
|
||||||
args.append(
|
args.append(
|
||||||
self.define(
|
self.define(
|
||||||
"CMAKE_CXX_FLAGS",
|
"CMAKE_CXX_FLAGS",
|
||||||
f"-I{self.spec['roctracer-dev'].prefix.include} "
|
f"-I{self.spec['roctracer-dev'].prefix.include} "
|
||||||
f"-L{self.spec['roctracer-dev'].prefix.lib} "
|
f"-L{self.spec['roctracer-dev'].prefix.roctracer.lib} "
|
||||||
f"-I{self.spec['nlohmann-json'].prefix.include} "
|
f"-I{self.spec['nlohmann-json'].prefix.include} "
|
||||||
f"-I{self.spec['sqlite'].prefix.include} ",
|
f"-I{self.spec['sqlite'].prefix.include} ",
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user