* [gentoo-commits] proj/sci:master commit in: sci-libs/oneDAL/, sci-libs/oneDAL/files/
@ 2023-08-22 10:13 Andrew Ammerlaan
0 siblings, 0 replies; only message in thread
From: Andrew Ammerlaan @ 2023-08-22 10:13 UTC (permalink / raw
To: gentoo-commits
commit: 7a422a7ea5cb34e297346d1a44b3faa794097aaf
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 10:08:01 2023 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 10:08:01 2023 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a422a7e
sci-libs/oneDAL: add 2023.2.1
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
.../oneDAL/files/oneDAL-2023.2.1-fix-compile.patch | 162 +++++++++++++++++++++
sci-libs/oneDAL/oneDAL-2023.2.1.ebuild | 85 +++++++++++
2 files changed, 247 insertions(+)
diff --git a/sci-libs/oneDAL/files/oneDAL-2023.2.1-fix-compile.patch b/sci-libs/oneDAL/files/oneDAL-2023.2.1-fix-compile.patch
new file mode 100644
index 000000000..50731570d
--- /dev/null
+++ b/sci-libs/oneDAL/files/oneDAL-2023.2.1-fix-compile.patch
@@ -0,0 +1,162 @@
+diff --git a/dev/bazel/deps/onedal.bzl b/dev/bazel/deps/onedal.bzl
+index f0f7662c0..6b9d11ff2 100644
+--- a/dev/bazel/deps/onedal.bzl
++++ b/dev/bazel/deps/onedal.bzl
+@@ -21,18 +21,12 @@ onedal_repo = repos.prebuilt_libs_repo_rule(
+ "include",
+ ],
+ libs = [
+- # Static
+- "lib/intel64/libonedal_core.a",
+- "lib/intel64/libonedal_thread.a",
+- "lib/intel64/libonedal.a",
+- "lib/intel64/libonedal_dpc.a",
+- "lib/intel64/libonedal_sycl.a",
+-
+ # Dynamic
+ "lib/intel64/libonedal_core.so",
+ "lib/intel64/libonedal_thread.so",
+ "lib/intel64/libonedal.so",
+ "lib/intel64/libonedal_dpc.so",
++ "lib/intel64/libonedal_sycl.so",
+ ],
+ build_template = "@onedal//dev/bazel/deps:onedal.tpl.BUILD",
+ )
+diff --git a/dev/bazel/deps/onedal.tpl.BUILD b/dev/bazel/deps/onedal.tpl.BUILD
+index 60be67856..0f7990ef5 100644
+--- a/dev/bazel/deps/onedal.tpl.BUILD
++++ b/dev/bazel/deps/onedal.tpl.BUILD
+@@ -9,62 +9,17 @@ cc_library(
+ includes = [ "include" ],
+ )
+
+-cc_library(
+- name = "core_static",
+- srcs = [
+- "lib/intel64/libonedal_core.a",
+- ],
+- deps = [
+- ":headers",
+- # TODO: Currently vml_ipp lib depends on TBB, but it shouldn't
+- # Remove TBB from deps once problem with vml_ipp is resolved
+- "@tbb//:tbb_binary",
+- ],
+-)
+-
+-cc_library(
+- name = "thread_static",
+- srcs = [
+- "lib/intel64/libonedal_thread.a",
+- ],
+- deps = [
+- ":headers",
+- "@tbb//:tbb_binary",
+- "@tbb//:tbbmalloc_binary",
+- ],
+-)
+
+ cc_library(
+ name = "onedal_sycl",
+ srcs = [
+- "lib/intel64/libonedal_sycl.a",
+- ],
+- deps = [
+- ":headers",
+- ],
+-)
+-
+-cc_library(
+- name = "onedal_static",
+- srcs = [
+- "lib/intel64/libonedal.a",
++ "lib/intel64/libonedal_sycl.so",
+ ],
+ deps = [
+ ":headers",
+ ],
+ )
+
+-cc_library(
+- name = "onedal_static_dpc",
+- srcs = [
+- "lib/intel64/libonedal_dpc.a",
+- ],
+- deps = [
+- ":headers",
+- ":onedal_sycl",
+- ],
+-)
+-
+ cc_library(
+ name = "core_dynamic",
+ srcs = [
+diff --git a/dev/make/cmplr.dpcpp.mk b/dev/make/cmplr.dpcpp.mk
+index 2a78043b7..b431e1255 100644
+--- a/dev/make/cmplr.dpcpp.mk
++++ b/dev/make/cmplr.dpcpp.mk
+@@ -28,13 +28,13 @@ CORE.SERV.COMPILER.dpcpp = generic
+ -Zl.dpcpp =
+ -DEBC.dpcpp = -g
+
+-COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \
++COMPILER.lnx.dpcpp = $(CXX) $(CXXFLAGS) -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \
+ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel
+-COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \
++COMPILER.win.dpcpp = $(CC) $(CFLAGS) -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \
+ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel
+
+-link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel
+-link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel
++link.dynamic.lnx.dpcpp = $(CXX) $(LDFLAGS) -fsycl -m64 -fsycl-device-code-split=per_kernel
++link.dynamic.win.dpcpp = $(CC) $(LDFLAGS) -fsycl -m64 -fsycl-device-code-split=per_kernel
+
+ pedantic.opts.lnx.dpcpp = -pedantic \
+ -Wall \
+diff --git a/dev/make/cmplr.icx.mk b/dev/make/cmplr.icx.mk
+index cbcde1a7e..61ef3583c 100644
+--- a/dev/make/cmplr.icx.mk
++++ b/dev/make/cmplr.icx.mk
+@@ -24,14 +24,14 @@ CMPLRDIRSUFF.icx = _icx
+
+ CORE.SERV.COMPILER.icx = generic
+
+--Zl.icx = -no-intel-lib=libirc
++-Zl.icx =
+ -DEBC.icx = -g
+
+-COMPILER.lnx.icx = icpx -m64 \
++COMPILER.lnx.icx = $(CXX) $(CXXFLAGS) -m64 \
+ -Werror -Wreturn-type
+
+
+-link.dynamic.lnx.icx = icpx -m64
++link.dynamic.lnx.icx = $(CXX) $(LDFLAGS) -m64
+
+ pedantic.opts.icx = -pedantic \
+ -Wall \
+diff --git a/makefile b/makefile
+index 525e52728..db864e9cb 100644
+--- a/makefile
++++ b/makefile
+@@ -215,7 +215,7 @@ TBBDIR.2 := $(if $(TBBDIR.2),$(TBBDIR.2),$(error Can`t find TBB neither in $(DIR
+
+ TBBDIR.include := $(if $(TBBDIR),$(TBBDIR)/include/tbb $(TBBDIR)/include)
+
+-TBBDIR.libia.prefix := $(TBBDIR.2)/lib
++TBBDIR.libia.prefix := $(TBBDIR.2)/lib64
+
+ TBBDIR.libia.win.vc1 := $(if $(OS_is_win),$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/$(_IA)/vc_mt),$(TBBDIR.libia.prefix)/$(_IA)/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/$(_IA)/vc14),$(TBBDIR.libia.prefix)/$(_IA)/vc14)))
+ TBBDIR.libia.win.vc2 := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc1),,$(firstword $(filter $(call topf,$$TBBROOT)%,$(subst ;,$(space),$(call topf,$$LIB))))))
+@@ -223,10 +223,10 @@ TBBDIR.libia.win.vc22 := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc2),$(wildca
+
+ TBBDIR.libia.win:= $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(TBBDIR.libia.win.vc1),$(TBBDIR.libia.win.vc1),$(error Can`t find TBB libs nether in $(call frompf,$(TBBDIR.libia.prefix))/$(_IA)/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).))))
+
+-TBBDIR.libia.lnx.gcc1 := $(if $(OS_is_lnx),$(if $(wildcard $(TBBDIR.libia.prefix)/$(_IA)/gcc4.8/*),$(TBBDIR.libia.prefix)/$(_IA)/gcc4.8))
++TBBDIR.libia.lnx.gcc1 := $(if $(OS_is_lnx),$(if $(wildcard $(TBBDIR.libia.prefix)/*),$(TBBDIR.libia.prefix)))
+ TBBDIR.libia.lnx.gcc2 := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc1),,$(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH))))))
+ TBBDIR.libia.lnx.gcc22 := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc2),$(wildcard $(TBBDIR.libia.lnx.gcc2)/libtbb.so)))
+-TBBDIR.libia.lnx := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc22),$(TBBDIR.libia.lnx.gcc2),$(if $(TBBDIR.libia.lnx.gcc1),$(TBBDIR.libia.lnx.gcc1),$(error Can`t find TBB runtimes nether in $(TBBDIR.libia.prefix)/$(_IA)/gcc4.8 not in $(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH)))).))))
++TBBDIR.libia.lnx := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc22),$(TBBDIR.libia.lnx.gcc2),$(if $(TBBDIR.libia.lnx.gcc1),$(TBBDIR.libia.lnx.gcc1),$(error Can`t find TBB runtimes nether in $(TBBDIR.libia.prefix) not in $(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH)))).))))
+
+ TBBDIR.libia.mac.clang1 := $(if $(OS_is_mac),$(if $(wildcard $(TBBDIR.libia.prefix)/*),$(TBBDIR.libia.prefix)))
+ TBBDIR.libia.mac.clang2 := $(if $(OS_is_mac),$(if $(TBBDIR.libia.mac.clang1),,$(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LIBRARY_PATH))))))
diff --git a/sci-libs/oneDAL/oneDAL-2023.2.1.ebuild b/sci-libs/oneDAL/oneDAL-2023.2.1.ebuild
new file mode 100644
index 000000000..9007f7a51
--- /dev/null
+++ b/sci-libs/oneDAL/oneDAL-2023.2.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit python-any-r1 java-pkg-2
+
+MKLFPK_VER="20221214"
+MKLGPUFPK_VER="20221214"
+
+DESCRIPTION="oneAPI Data Analytics Library"
+HOMEPAGE="https://github.com/oneapi-src/oneDAL"
+# Secondary urls extracted from dev/download_micromkl.sh
+SRC_URI="
+ https://github.com/oneapi-src/oneDAL/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/oneapi-src/oneDAL/releases/download/Dependencies/mklgpufpk_lnx_${MKLGPUFPK_VER}.tgz
+ https://github.com/oneapi-src/oneDAL/releases/download/Dependencies/mklfpk_lnx_${MKLFPK_VER}.tgz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="sys-devel/DPC++"
+
+RDEPEND="
+ dev-cpp/tbb:=
+ dev-libs/opencl-icd-loader
+ virtual/jdk:17
+"
+DEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2023.2.1-fix-compile.patch"
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ mkdir -p "${S}/__deps/mklfpk/" "${S}/__deps/mklgpufpk/lnx" || die
+ cd "${S}/__deps/mklfpk/" || die
+ unpack "mklfpk_lnx_${MKLFPK_VER}.tgz"
+ cd "${S}/__deps/mklgpufpk/lnx" || die
+ unpack "mklgpufpk_lnx_${MKLGPUFPK_VER}.tgz"
+}
+
+src_prepare() {
+ # DPC++ compiler required for full functionality
+ export CC="${ESYSROOT}/usr/lib/llvm/intel/bin/clang"
+ export CXX="${ESYSROOT}/usr/lib/llvm/intel/bin/clang++"
+ export TBBROOT="${ESYSROOT}/usr"
+ export CPLUS_INCLUDE_PATH="./cpp/daal/include:${ESYSROOT}/usr/lib/llvm/intel/include"
+ export JAVA_HOME="${ESYSROOT}/usr/lib64/openjdk-17/"
+ export PATH="${JAVA_HOME}/bin:${PATH}"
+ export CPATH="${JAVA_HOME}/include:${JAVA_HOME}/include/linux:${CPATH}"
+
+ default
+}
+
+src_compile() {
+ emake PLAT=lnx32e COMPILER=icx daal oneapi
+}
+
+src_install() {
+ einstalldocs
+ cd __release_lnx_icx/daal/latest || die
+ docinto examples
+ dodoc -r examples/*
+ docinto samples
+ dodoc -r samples/*
+ doheader -r include/*
+ dolib.so lib/intel64/*.so*
+ dolib.a lib/intel64/*.a*
+ insinto /usr/share/pkgconfig
+ doins -r lib/pkgconfig/*
+ java-pkg_dojar lib/*.jar
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-22 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 10:13 [gentoo-commits] proj/sci:master commit in: sci-libs/oneDAL/, sci-libs/oneDAL/files/ Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox