summaryrefslogtreecommitdiff
path: root/sci-libs/clblast
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/clblast
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/clblast')
-rw-r--r--sci-libs/clblast/Manifest3
-rw-r--r--sci-libs/clblast/clblast-1.5.2-r1.ebuild66
-rw-r--r--sci-libs/clblast/files/level2_xtrsv.patch14
-rw-r--r--sci-libs/clblast/files/level3_xtrsv.patch14
4 files changed, 97 insertions, 0 deletions
diff --git a/sci-libs/clblast/Manifest b/sci-libs/clblast/Manifest
index a5944c57135c..ed87a565ec1f 100644
--- a/sci-libs/clblast/Manifest
+++ b/sci-libs/clblast/Manifest
@@ -1,3 +1,6 @@
+AUX level2_xtrsv.patch 620 BLAKE2B ce46953c59e53e33315bfe3d8ccc78a6ec5e2bb72c1c67ad6717632ec07085569ed0195dc95072224df4fb665c87572c88ce6c879c452d5bee293222517ddacc SHA512 9a85a86dbfbb475ed3e9aef551efa5ad879bbefcfa0e5e2b16fe8047331b4c2954a6b3f56a06f4f672464dc9c2db3e2ba4049371274a5ececd049759036d4026
+AUX level3_xtrsv.patch 624 BLAKE2B 8c82e6ca64dce94dc02b99b5857fb148925cfdb16f4b778eb8e36d6c335a295de7c56d1cfe3c13ada1cb34aad9cb3d44ce1b48fe72406a788734c2501d7abee7 SHA512 ce7c4a545f58214b4235ba0345e5f3a76969856c91ccc839ccde5afe417c4f16dfe70be0d9f40f1e2f39781e3be508fcd93a03815189fe981d446e4a7b77fb35
DIST clblast-1.5.2.tar.gz 419730 BLAKE2B 9954e39b490b75f3d989969260146ff9e9f5311865f13779e0ee8bc70578d6c51fd7c5e27af777a9d6c9703992d5acb164211aec39568f2f0ba1cf10db211b24 SHA512 6693704321bb7623a632ebfc71dcf07bbe4ba6c6f03a2ecf52bc10b401ae546bf82cdd3f6cc28aa9ea10f40dc7b2e86a6530f32cfbd522e24d4cf6a75c8c1100
+EBUILD clblast-1.5.2-r1.ebuild 1411 BLAKE2B ccd56d035ba87775285076122b94f9859e1538eecf5b7f8b94f93134c427660380b6ebdb8636839f005c911931416e9b87363ac8a4ef6cb5659e5b3c056b01ad SHA512 433dc281f3f711204c88f48692804535b378fe17f909484fcbe82b602584f626ad7f80e5e59a16fb169ef262eca06e3cf245d2f4cd1cef4b7d03e8239fc96ce5
EBUILD clblast-1.5.2.ebuild 1320 BLAKE2B 0f0790cc4a4c3efb58c50c054942d2b2fc45b69f24f3dc4fcc35013c6c9442641d63d0ca4d1e4627654e0d75fc8d34b19fdd611b7f317985d04981362f567991 SHA512 e36a668a500acbcdc7a86652b1a75d46777c13a93d9a40e1eac1ca8dec0b89d7f1b41e77512662fbef0f2cea699cf9821425bfeebbafdc623630884d69c2a6db
MISC metadata.xml 1123 BLAKE2B 76dfa4ab586b6d019a6ab22e8433a226f1bf03caa36da63355a702c47ce1de882b5a7049c872d759f869c679425fb4f4355b3c113dae574f1e77129f5fb30706 SHA512 8e0fbc24d8d8cc8f53869610d9b8533ea590cf1e7f3205445caa371f882efdde84a27abe8510764cd63daef83c4e62439b9e88cf439aacbd998e0f940d965b5d
diff --git a/sci-libs/clblast/clblast-1.5.2-r1.ebuild b/sci-libs/clblast/clblast-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..604dd3d840e1
--- /dev/null
+++ b/sci-libs/clblast/clblast-1.5.2-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+MYPN="CLBlast"
+
+DESCRIPTION="Tuned OpenCL BLAS"
+HOMEPAGE="https://github.com/CNugteren/CLBlast"
+SRC_URI="https://github.com/CNugteren/${MYPN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MYPN}-${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Cuda is still beta, default to opencl
+IUSE="client cuda examples +opencl test"
+REQUIRED_USE="
+ ^^ ( cuda opencl )
+ test? ( client )
+"
+# Tests require write access to /dev/dri/renderD...
+RESTRICT="test"
+# RESTRICT="!test? ( test )"
+
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-toolkit:= )
+ client? ( virtual/cblas )
+ opencl? ( virtual/opencl )
+"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/level2_xtrsv.patch
+ "${FILESDIR}"/level3_xtrsv.patch
+)
+
+src_prepare() {
+ # no forced optimisation, libdir
+ sed -e 's/-O3//g' \
+ -e 's/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/g' \
+ -i CMakeLists.txt || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ mycmakeargs+=(
+ -DBUILD_SHARED_LIBS=ON
+ -DSAMPLES="$(usex examples)"
+ -DCLIENTS="$(usex client)"
+ -DNETLIB="$(usex client)"
+ -DTESTS="$(usex test)"
+ -DOPENCL="$(usex opencl)"
+ -DCUDA="$(usex cuda)"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ dodoc README.md ROADMAP.md CONTRIBUTING.md CHANGELOG
+ dodoc -r doc
+}
diff --git a/sci-libs/clblast/files/level2_xtrsv.patch b/sci-libs/clblast/files/level2_xtrsv.patch
new file mode 100644
index 000000000000..c1e5890c986b
--- /dev/null
+++ b/sci-libs/clblast/files/level2_xtrsv.patch
@@ -0,0 +1,14 @@
+This fixes a bug in the upstream code. There is an extra argument in
+the call to the x_buffer.CopyToAsync function that must be removed. Otherwise
+the build fails when CUDA is enabled.
+--- CLBlast/src/routines/level2/xtrsv.cpp 2022-05-21 08:44:13.811816246 -0600
++++ CLBlast_fixed/src/routines/level2/xtrsv.cpp 2022-05-21 08:28:34.601124921 -0600
+@@ -154,7 +154,7 @@
+ }
+
+ // Retrieves the results
+- x_buffer.CopyToAsync(queue_, x_size, b_buffer, event_);
++ x_buffer.CopyToAsync(queue_, x_size, b_buffer);
+ }
+
+ // =================================================================================================
diff --git a/sci-libs/clblast/files/level3_xtrsv.patch b/sci-libs/clblast/files/level3_xtrsv.patch
new file mode 100644
index 000000000000..abba1cd23026
--- /dev/null
+++ b/sci-libs/clblast/files/level3_xtrsv.patch
@@ -0,0 +1,14 @@
+This fixes a problem in the upstream code. There is an extra argument in
+the call to the x_buffer.CopyToAsync function that must be removed. Otherwise
+the build fails when CUDA is enabled.
+--- CLBlast/src/routines/level3/xtrsm.cpp 2022-05-21 08:44:13.815816361 -0600
++++ CLBlast_fixed/src/routines/level3/xtrsm.cpp 2022-05-21 08:28:06.756355738 -0600
+@@ -246,7 +246,7 @@
+ }
+
+ // Retrieves the results
+- x_buffer.CopyToAsync(queue_, b_size, b_buffer, event_);
++ x_buffer.CopyToAsync(queue_, b_size, b_buffer);
+ }
+
+ // =================================================================================================