All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 1/2] opencl: update package naming
@ 2020-01-17 18:27 Jacob Stiffler
  2020-01-17 18:27 ` [RFC][PATCH 2/2] packagegroups: opencl: install offline-compiled examples by default Jacob Stiffler
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Stiffler @ 2020-01-17 18:27 UTC (permalink / raw)
  To: meta-arago

For opencl, use the runtime package to pull in the minimal set of
dependencies needed to run opencl applications. The applications must
use precompiled kernels. Use the main package to pull in the full set
of tools, including clocl and the accelerator toolchains.

For the opencl-examples, the offline-compile package are the examples
which provide precompiled kernels, and thus require the minimum set of
dependencies. The runtime-compile package requires the kernels to be
compiled during runtime, and thus require the full set of opencl
tools, including clocl.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 .../recipes-ti/ocl/opencl-examples_git.bb          | 25 ++++++++++++----------
 meta-arago-extras/recipes-ti/ocl/opencl_git.bb     | 18 ++++++++++------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb b/meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb
index fe09b90..bb7ff83 100644
--- a/meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb
+++ b/meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb
@@ -5,7 +5,7 @@ LICENSE = "BSD"
 include ocl.inc
 require recipes-ti/includes/ti-paths.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 COMPATIBLE_MACHINE = "dra7xx|keystone"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -16,12 +16,15 @@ OCL_PERSISTENT_DEPENDS = "ti-xdctools-native ti-ipc-rtos ti-sysbios"
 
 DEPENDS_append_dra7xx = " ${OCL_PERSISTENT_DEPENDS}"
 
-PACKAGES =+ "${PN}-runtime ${PN}-runtime-dbg ${PN}-offline ${PN}-offline-dbg"
+# Split examples into two groups:
+# - offline-compile: examples who's kernels are precompiled (offline).
+# - runtime-compile: examples who's kernels are compiled during runtime.
+PACKAGES =+ "${PN}-runtime-compile ${PN}-runtime-compile-dbg ${PN}-offline-compile ${PN}-offline-compile-dbg"
 
-RDEPENDS_${PN} = "${PN}-runtime ${PN}-offline"
+RDEPENDS_${PN} = "${PN}-runtime-compile ${PN}-offline-compile"
 RDEPENDS_${PN}-dev += "libgomp-dev"
-RDEPENDS_${PN}-offline += "opencl"
-RDEPENDS_${PN}-runtime += "opencl-runtime"
+RDEPENDS_${PN}-offline-compile += "opencl-runtime"
+RDEPENDS_${PN}-runtime-compile += "opencl"
 
 S = "${WORKDIR}/git/opencl_example_src"
 B = "${S}"
@@ -116,20 +119,20 @@ do_install() {
 }
 
 # First package the examples which require run-time kernel compilation.
-FILES_${PN}-runtime += "\
+FILES_${PN}-runtime-compile += "\
     ${@' '.join(['${datadir}/ti/examples/opencl/' + example for example in d.getVar('OCL_RUNTIME_COMPILE_EXAMPLE_LIST').split()])} \
 "
 
-FILES_${PN}-runtime-dbg += "\
+FILES_${PN}-runtime-compile-dbg += "\
     ${@' '.join(['${datadir}/ti/examples/opencl/' + example + '/.debug' for example in d.getVar('OCL_RUNTIME_COMPILE_EXAMPLE_LIST').split()])} \
 "
 
 # Remaining examples will fall through to the "offline" package.
-FILES_${PN}-offline += "\
+FILES_${PN}-offline-compile += "\
     ${datadir}/ti/examples/opencl/ \
 "
 
-FILES_${PN}-offline-dbg += "\
+FILES_${PN}-offline-compile-dbg += "\
     ${datadir}/ti/examples/opencl/*/.debug \
 "
 
@@ -139,5 +142,5 @@ FILES_${PN}-dev = "${datadir}/ti/examples/opencl/Makefile \
 
 ALLOW_EMPTY_${PN} = "1"
 INSANE_SKIP_${PN} = "arch ldflags textrel staticdev"
-INSANE_SKIP_${PN}-offline = "arch ldflags textrel staticdev"
-INSANE_SKIP_${PN}-runtime = "arch ldflags textrel staticdev"
+INSANE_SKIP_${PN}-offline-compile = "arch ldflags textrel staticdev"
+INSANE_SKIP_${PN}-runtime-compile = "arch ldflags textrel staticdev"
diff --git a/meta-arago-extras/recipes-ti/ocl/opencl_git.bb b/meta-arago-extras/recipes-ti/ocl/opencl_git.bb
index 7128c74..59cb8ca 100644
--- a/meta-arago-extras/recipes-ti/ocl/opencl_git.bb
+++ b/meta-arago-extras/recipes-ti/ocl/opencl_git.bb
@@ -4,13 +4,16 @@ LICENSE = "BSD"
 
 include ocl.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 inherit cmake systemd
 
 COMPATIBLE_MACHINE = "dra7xx|keystone"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+# Define runtime package for minimal dependencies to run opencl applications
+# which precompile the offloaded kernels. The base package will provide the
+# ability to compile kernels (clocl) during runtime.
 PACKAGES =+ "${PN}-runtime"
 
 MONITORS                      = " opencl-monitor"
@@ -40,11 +43,12 @@ DEPENDS_append_dra7xx   = " ti-ipc virtual/kernel"
 DEPENDS_append_keystone = " mpm-transport multiprocmgr"
 DEPENDS_remove_k2g = " libulm"
 
-RDEPENDS_${PN} += " bash ${MONITORS}"
+RDEPENDS_${PN}-runtime += " bash ${MONITORS}"
 RDEPENDS_${PN}-dev += " ocl-gl-headers-dev"
-RDEPENDS_${PN}-runtime += " ${PN} clocl"
+RDEPENDS_${PN} += " ${PN}-runtime clocl"
 
-ALLOW_EMPTY_${PN}-runtime = "1"
+# Use main package to pull in full support
+ALLOW_EMPTY_${PN} = "1"
 
 S = "${WORKDIR}/git/host"
 
@@ -73,10 +77,10 @@ do_install_append() {
     install -m0644 ${MCTD} ${D}${systemd_system_unitdir}/ti-mct-daemon.service
 }
 
-SYSTEMD_SERVICE_${PN} = "ti-mct-daemon.service"
-SYSTEMD_AUTO_ENABLE_${PN} = "${@oe.utils.conditional("RESERVE_CMEM", "1", "enable", "disable", d)}"
+SYSTEMD_SERVICE_${PN}-runtime = "ti-mct-daemon.service"
+SYSTEMD_AUTO_ENABLE_${PN}-runtime = "${@oe.utils.conditional("RESERVE_CMEM", "1", "enable", "disable", d)}"
 
-FILES_${PN}-runtime += "${bindir}"
+FILES_${PN}-runtime += "${bindir} ${systemd_system_unitdir}"
 
 FILES_${PN} += " \
     ${datadir}/ti/opencl/* \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [RFC][PATCH 2/2] packagegroups: opencl: install offline-compiled examples by default
  2020-01-17 18:27 [RFC][PATCH 1/2] opencl: update package naming Jacob Stiffler
@ 2020-01-17 18:27 ` Jacob Stiffler
  0 siblings, 0 replies; 2+ messages in thread
From: Jacob Stiffler @ 2020-01-17 18:27 UTC (permalink / raw)
  To: meta-arago

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 .../recipes-core/packagegroups/packagegroup-arago-tisdk-opencl.bb   | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-opencl.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-opencl.bb
index dfd8555..d19098e 100644
--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-opencl.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-opencl.bb
@@ -9,13 +9,10 @@ inherit packagegroup
 PACKAGES =+ "${PN}-extra"
 
 MAIN_PKGS = " \
-    opencl-examples \
+    opencl-examples-offline-compile \
 "
 
 EXTRA_PKGS = " \
-    opencl-staticdev \
-    opencl-examples-dev \
-    openmpacc-examples-dev \
     python-pyopencl \
 "
 
@@ -26,7 +23,6 @@ EXTRA_PKGS_append_k2hk = " \
 
 EXTRA_PKGS_append_dra7xx = " \
     linalg-examples \
-    opencl-examples \
     kaldi \
     ti-fftw-examples \
 "
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-17 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 18:27 [RFC][PATCH 1/2] opencl: update package naming Jacob Stiffler
2020-01-17 18:27 ` [RFC][PATCH 2/2] packagegroups: opencl: install offline-compiled examples by default 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.