Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 796012 Details for
Bug 861251
dev-python/pyopencl: enable FEATURES=test using dev-libs/pocl to run OpenCL code
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with merge conflicts resolved
0001-dev-python-pyopencl-Enable-FEATURES-test-using-dev-l.patch (text/plain), 2.66 KB, created by
Chris Kerr
on 2022-07-31 09:31:46 UTC
(
hide
)
Description:
Patch with merge conflicts resolved
Filename:
MIME Type:
Creator:
Chris Kerr
Created:
2022-07-31 09:31:46 UTC
Size:
2.66 KB
patch
obsolete
>From beedc68ac6476a1eadd43274e89bc9c1bdbe51bc Mon Sep 17 00:00:00 2001 >From: Christopher Kerr <chris.kerr@mykolab.ch> >Date: Sun, 31 Jul 2022 12:30:13 +0300 >Subject: [PATCH] dev-python/pyopencl: Enable FEATURES=test using dev-libs/pocl > as OpenCL implementation > >Use multiprocessing eclass to set thread count based on MAKEOPTS > >Signed-off-by: Christopher Kerr <chris.kerr@mykolab.ch> >--- > dev-python/pyopencl/pyopencl-2022.1.6.ebuild | 28 +++++++++++++------- > 1 file changed, 18 insertions(+), 10 deletions(-) > >diff --git a/dev-python/pyopencl/pyopencl-2022.1.6.ebuild b/dev-python/pyopencl/pyopencl-2022.1.6.ebuild >index 19e2c5a987..775a15008a 100644 >--- a/dev-python/pyopencl/pyopencl-2022.1.6.ebuild >+++ b/dev-python/pyopencl/pyopencl-2022.1.6.ebuild >@@ -6,7 +6,7 @@ EAPI=8 > PYTHON_COMPAT=( python3_{8..10} ) > DISTUTILS_USE_PEP517=setuptools > >-inherit distutils-r1 >+inherit distutils-r1 multiprocessing > > DESCRIPTION="Python wrapper for OpenCL" > HOMEPAGE="https://mathema.tician.de/software/pyopencl/ >@@ -16,7 +16,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" > LICENSE="GPL-2" > SLOT="0" > KEYWORDS="~amd64 ~ppc64" >-IUSE="examples opengl" >+IUSE="examples opengl test" > > COMMON=">=virtual/opencl-2" > # libglvnd is only needed for the headers >@@ -29,15 +29,11 @@ RDEPEND="${COMMON} > >=dev-python/pytools-2021.2.7[${PYTHON_USEDEP}]" > BDEPEND="dev-python/numpy[${PYTHON_USEDEP}] > >=dev-python/pybind11-2.5.0[${PYTHON_USEDEP}] >- <dev-python/pybind11-2.10.0[${PYTHON_USEDEP}]" >+ <dev-python/pybind11-2.10.0[${PYTHON_USEDEP}] >+ opengl? ( media-libs/libglvnd ) >+ test? ( dev-libs/pocl )" > >-# The test suite fails if there are no OpenCL platforms available, and >-# even if there is one (which requires the presence of both an OpenCL >-# runtime *and* hardware supported by it - simply emerging any runtime >-# is not enough) the vast majority of tests end up skipped because by >-# default the portage user hasn't got sufficient privileges to talk >-# to the GPU. >-RESTRICT="test" >+distutils_enable_tests pytest > > python_configure_all() { > local myconf=() >@@ -49,6 +45,18 @@ python_configure_all() { > "${myconf[@]}" > } > >+python_test() { >+ # Use dev-libs/pocl for testing; ignore any other OpenCL devices that might be present >+ local -x PYOPENCL_TEST="portable:pthread" >+ # Set the number of threads to match MAKEOPTS >+ local -x POCL_MAX_PTHREAD_COUNT=$(makeopts_jobs) >+ # Change to the 'test' directory so that python does not try to import pyopencl from the source directory >+ # (Importing from the source directory fails, because the compiled '_cl' module is only in the build directory) >+ pushd 'test' >+ epytest >+ popd >+} >+ > python_install_all() { > if use examples; then > dodoc -r examples >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 861251
:
794636
|
794639
|
794855
|
795862
| 796012