* [meta-processor-sdk][PATCH v2] neo-ai-dlr: fix dlr runtime problem
@ 2019-11-26 15:13 Jianzhong Xu
2019-11-26 17:32 ` [EXTERNAL] " Jacob Stiffler
0 siblings, 1 reply; 2+ messages in thread
From: Jianzhong Xu @ 2019-11-26 15:13 UTC (permalink / raw)
To: meta-arago
* bump up neo-ai-dlr SRCREV
* add a patch to skip git cloning during cmake configuration
* move libdlr.so to python site-packages dlr folder
* add neo-ai-dlr-tests to target file system
* change testing scripts' path to be the same as in source code
Signed-off-by: Jianzhong Xu <xuj@ti.com>
---
.../packagegroup-arago-tisdk-addons.bbappend | 2 +-
...akeLists-skip-cloning-of-googletests.patch | 50 +++++++++++++++++++
recipes-support/neo-ai/neo-ai-dlr_git.bb | 25 ++++++----
3 files changed, 65 insertions(+), 12 deletions(-)
create mode 100644 recipes-support/neo-ai/files/0001-CMakeLists-skip-cloning-of-googletests.patch
diff --git a/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bbappend b/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bbappend
index 2a298e0..aa0a182 100644
--- a/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bbappend
+++ b/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bbappend
@@ -17,7 +17,7 @@ EXTRA_PACKAGES_append_k3 = " watchdog"
EXTRA_PACKAGES_append_omapl138 = " ccief-basic"
-NEO_AI_PACKAGES = "neo-ai-dlr"
+NEO_AI_PACKAGES = "neo-ai-dlr neo-ai-dlr-tests"
NEO_AI_PACKAGES_armv5 = ""
EXTRA_PACKAGES_append = " hidapi \
diff --git a/recipes-support/neo-ai/files/0001-CMakeLists-skip-cloning-of-googletests.patch b/recipes-support/neo-ai/files/0001-CMakeLists-skip-cloning-of-googletests.patch
new file mode 100644
index 0000000..32a7bbd
--- /dev/null
+++ b/recipes-support/neo-ai/files/0001-CMakeLists-skip-cloning-of-googletests.patch
@@ -0,0 +1,50 @@
+From 3d9fa328598b38022c638b402d111000ce0d88c7 Mon Sep 17 00:00:00 2001
+From: Jianzhong Xu <xuj@ti.com>
+Date: Tue, 26 Nov 2019 08:53:33 -0500
+Subject: [PATCH] CMakeLists: skip cloning of googletests
+
+Signed-off-by: Jianzhong Xu <xuj@ti.com>
+---
+ CMakeLists.txt | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 281fdb7..70a88d7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -293,19 +293,19 @@ add_custom_target(demo DEPENDS ${DEMO_EXECS})
+
+ # Tests
+ if(NOT(ANDROID_BUILD OR AAR_BUILD))
+- include(cmake/googletest.cmake)
+- fetch_googletest(
+- ${PROJECT_SOURCE_DIR}/cmake
+- ${PROJECT_BINARY_DIR}/googletest
+- )
+-
+- enable_testing()
+-
+- file(GLOB TEST_SRCS tests/cpp/*.cc)
+- if(WITH_TENSORFLOW_LITE_LIB)
+- file(GLOB TFLITE_TEST_SRCS tests/cpp/dlr_tflite/*.cc)
+- list(APPEND TEST_SRCS ${TFLITE_TEST_SRCS})
+- endif()
++ #include(cmake/googletest.cmake)
++ #fetch_googletest(
++ # ${PROJECT_SOURCE_DIR}/cmake
++ # ${PROJECT_BINARY_DIR}/googletest
++ # )
++ #
++ #enable_testing()
++ #
++ #file(GLOB TEST_SRCS tests/cpp/*.cc)
++ #if(WITH_TENSORFLOW_LITE_LIB)
++ # file(GLOB TFLITE_TEST_SRCS tests/cpp/dlr_tflite/*.cc)
++ # list(APPEND TEST_SRCS ${TFLITE_TEST_SRCS})
++ #endif()
+ foreach(__srcpath ${TEST_SRCS})
+ get_filename_component(__srcname ${__srcpath} NAME)
+ string(REPLACE ".cc" "" __execname ${__srcname})
+--
+2.17.1
+
diff --git a/recipes-support/neo-ai/neo-ai-dlr_git.bb b/recipes-support/neo-ai/neo-ai-dlr_git.bb
index cbf4447..f0cf3e8 100644
--- a/recipes-support/neo-ai/neo-ai-dlr_git.bb
+++ b/recipes-support/neo-ai/neo-ai-dlr_git.bb
@@ -26,9 +26,10 @@ SRC_URI = "git://github.com/neo-ai/neo-ai-dlr;protocol=https;branch=${BRANCH};na
git://github.com/neo-ai/treelite;protocol=https;branch=master;destsuffix=${S}/3rdparty/treelite;name=neo-ai-treelite \
git://github.com/dmlc/dmlc-core;protocol=https;branch=master;destsuffix=${S}/3rdparty/treelite/dmlc-core;name=neo-ai-treelite-dmlc-core \
git://github.com/fmtlib/fmt;protocol=https;nobranch=1;destsuffix=${S}/3rdparty/treelite/3rdparty/fmt;name=neo-ai-treelite-fmt \
+ file://0001-CMakeLists-skip-cloning-of-googletests.patch \
"
-SRCREV_neo-ai-dlr = "dd9c8e806065b2c0fca97209c8bfd1cce0749ea9"
+SRCREV_neo-ai-dlr = "35ed4fa2607056608451d85508fea70f458a14a6"
SRCREV_neo-ai-tvm = "44779571412930681eef9e8b9d32aa845b8cc5ad"
SRCREV_neo-ai-tvm-dmlc-core = "4d49691f1a9d944c3b0aa5e63f1db3cad1f941f8"
SRCREV_neo-ai-tvm-dlpack = "bee4d1dd8dc1ee4a1fd8fa6a96476c2f8b7492a3"
@@ -45,26 +46,28 @@ do_install() {
# This does not do anything
#cmake_do_install
- install -d ${D}${libdir}
- install -m 0644 ${S}/lib/* ${D}${libdir}
+ install -d ${D}${includedir}/dlr_tflite
+ install -m 0644 ${S}/include/*.h ${D}${includedir}
+ install -m 0644 ${S}/include/dlr_tflite/*.h ${D}${includedir}/dlr_tflite
- install -d ${D}${includedir}
- install -m 0644 ${S}/include/* ${D}${includedir}
+ # Copy build directory to Python installation search path
+ cp -r ${B} ${S}
+ # Install DLR Python binding
cd ${S}/python
distutils3_do_install
- cd ${B}
- # setup.py install some libs under datadir, but we don't need them, so remove.
- rm ${D}${datadir}/dlr/*.so
+ # Install DLR library to Python import search path
+ install -m 0644 ${S}/build/lib/libdlr.so ${D}${PYTHON_SITEPACKAGES_DIR}/dlr
# Now install python test scripts
- install -d ${D}${datadir}/dlr/tests
- install -m 0644 ${S}/tests/python/integration/*.py ${D}${datadir}/dlr/tests/
+ install -d ${D}${datadir}/neo-ai-dlr/tests/python/integration
+ install -m 0644 ${S}/tests/python/integration/*.py ${D}${datadir}/neo-ai-dlr/tests/python/integration
+ install -m 0644 ${S}/tests/python/integration/*.npy ${D}${datadir}/neo-ai-dlr/tests/python/integration
}
PACKAGES =+ "${PN}-tests"
-FILES_${PN}-tests = "${datadir}/dlr/tests"
+FILES_${PN}-tests = "${datadir}/neo-ai-dlr/tests"
RDEPENDS_${PN}-tests += "${PN}"
# Versioned libs are not produced
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [EXTERNAL] [meta-processor-sdk][PATCH v2] neo-ai-dlr: fix dlr runtime problem
2019-11-26 15:13 [meta-processor-sdk][PATCH v2] neo-ai-dlr: fix dlr runtime problem Jianzhong Xu
@ 2019-11-26 17:32 ` Jacob Stiffler
0 siblings, 0 replies; 2+ messages in thread
From: Jacob Stiffler @ 2019-11-26 17:32 UTC (permalink / raw)
To: Jianzhong Xu, meta-arago
On 11/26/2019 10:13 AM, Jianzhong Xu wrote:
> * bump up neo-ai-dlr SRCREV
> * add a patch to skip git cloning during cmake configuration
> * move libdlr.so to python site-packages dlr folder
> * add neo-ai-dlr-tests to target file system
> * change testing scripts' path to be the same as in source code
>
> Signed-off-by: Jianzhong Xu <xuj@ti.com>
> ---
> .../packagegroup-arago-tisdk-addons.bbappend | 2 +-
> ...akeLists-skip-cloning-of-googletests.patch | 50 +++++++++++++++++++
> recipes-support/neo-ai/neo-ai-dlr_git.bb | 25 ++++++----
> 3 files changed, 65 insertions(+), 12 deletions(-)
> create mode 100644 recipes-support/neo-ai/files/0001-CMakeLists-skip-cloning-of-googletests.patch
>
...
> diff --git a/recipes-support/neo-ai/neo-ai-dlr_git.bb b/recipes-support/neo-ai/neo-ai-dlr_git.bb
> index cbf4447..f0cf3e8 100644
> --- a/recipes-support/neo-ai/neo-ai-dlr_git.bb
> +++ b/recipes-support/neo-ai/neo-ai-dlr_git.bb
> @@ -26,9 +26,10 @@ SRC_URI = "git://github.com/neo-ai/neo-ai-dlr;protocol=https;branch=${BRANCH};na
> git://github.com/neo-ai/treelite;protocol=https;branch=master;destsuffix=${S}/3rdparty/treelite;name=neo-ai-treelite \
> git://github.com/dmlc/dmlc-core;protocol=https;branch=master;destsuffix=${S}/3rdparty/treelite/dmlc-core;name=neo-ai-treelite-dmlc-core \
> git://github.com/fmtlib/fmt;protocol=https;nobranch=1;destsuffix=${S}/3rdparty/treelite/3rdparty/fmt;name=neo-ai-treelite-fmt \
> + file://0001-CMakeLists-skip-cloning-of-googletests.patch \
> "
>
> -SRCREV_neo-ai-dlr = "dd9c8e806065b2c0fca97209c8bfd1cce0749ea9"
> +SRCREV_neo-ai-dlr = "35ed4fa2607056608451d85508fea70f458a14a6"
> SRCREV_neo-ai-tvm = "44779571412930681eef9e8b9d32aa845b8cc5ad"
> SRCREV_neo-ai-tvm-dmlc-core = "4d49691f1a9d944c3b0aa5e63f1db3cad1f941f8"
> SRCREV_neo-ai-tvm-dlpack = "bee4d1dd8dc1ee4a1fd8fa6a96476c2f8b7492a3"
> @@ -45,26 +46,28 @@ do_install() {
> # This does not do anything
> #cmake_do_install
>
> - install -d ${D}${libdir}
> - install -m 0644 ${S}/lib/* ${D}${libdir}
> + install -d ${D}${includedir}/dlr_tflite
> + install -m 0644 ${S}/include/*.h ${D}${includedir}
> + install -m 0644 ${S}/include/dlr_tflite/*.h ${D}${includedir}/dlr_tflite
>
> - install -d ${D}${includedir}
> - install -m 0644 ${S}/include/* ${D}${includedir}
> + # Copy build directory to Python installation search path
> + cp -r ${B} ${S}
Can you set B = "${S}/build" instead?
>
> + # Install DLR Python binding
> cd ${S}/python
> distutils3_do_install
> - cd ${B}
>
> - # setup.py install some libs under datadir, but we don't need them, so remove.
> - rm ${D}${datadir}/dlr/*.so
Can you still remove this file? Packaging now gives a warning:
QA Issue: neo-ai-dlr: Files/directories were installed but not shipped
in any package:
/usr/share/dlr/libdlr.so
> + # Install DLR library to Python import search path
> + install -m 0644 ${S}/build/lib/libdlr.so ${D}${PYTHON_SITEPACKAGES_DIR}/dlr
>
> # Now install python test scripts
> - install -d ${D}${datadir}/dlr/tests
> - install -m 0644 ${S}/tests/python/integration/*.py ${D}${datadir}/dlr/tests/
> + install -d ${D}${datadir}/neo-ai-dlr/tests/python/integration
> + install -m 0644 ${S}/tests/python/integration/*.py ${D}${datadir}/neo-ai-dlr/tests/python/integration
> + install -m 0644 ${S}/tests/python/integration/*.npy ${D}${datadir}/neo-ai-dlr/tests/python/integration
> }
>
> PACKAGES =+ "${PN}-tests"
> -FILES_${PN}-tests = "${datadir}/dlr/tests"
> +FILES_${PN}-tests = "${datadir}/neo-ai-dlr/tests"
> RDEPENDS_${PN}-tests += "${PN}"
>
> # Versioned libs are not produced
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-26 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 15:13 [meta-processor-sdk][PATCH v2] neo-ai-dlr: fix dlr runtime problem Jianzhong Xu
2019-11-26 17:32 ` [EXTERNAL] " Jacob Stiffler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.