1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From 46c3ca855ea9e38ac48b8ccae314426f554a108d Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Date: Tue, 28 Feb 2023 05:49:52 +0900
Subject: [PATCH] module_loader.cpp: Change modules path to multiarch
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
---
src/runtime_src/core/common/module_loader.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/runtime_src/core/common/module_loader.cpp b/src/runtime_src/core/common/module_loader.cpp
index b4c7e4996..0d078b90b 100644
--- a/src/runtime_src/core/common/module_loader.cpp
+++ b/src/runtime_src/core/common/module_loader.cpp
@@ -116,7 +116,13 @@ module_path(const std::string& module)
#ifdef _WIN32
path /= "bin/" + module + ".dll";
#else
- path /= "lib/xrt/module/lib" + module + ".so";
+#if defined (__aarch64__)
+ path = "/usr/lib/aarch64-linux-gnu/xrt/module/lib" + module + ".so";
+#elif defined (__x86_64__)
+ path = "/usr/lib/x86_64-linux-gnu/xrt/module/lib" + module + ".so";
+#else
+ throw std::runtime_error("Not support architecture");
+#endif
#endif
if (!bfs::exists(path) || !bfs::is_regular_file(path))
--
2.36.1
|