GNU bug report logs - #55565
[PATCH] gnu: Add python-blis

Previous Next

Package: guix-patches;

Reported by: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>

Date: Sat, 21 May 2022 22:18:01 UTC

Severity: normal

Tags: patch

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55565 in the body.
You can then email your comments to 55565 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#55565; Package guix-patches. (Sat, 21 May 2022 22:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 21 May 2022 22:18:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-blis
Date: Sun, 22 May 2022 01:17:33 +0300
[Message part 1 (text/plain, inline)]
Hello,

this patch adds "blis" Python module[1] under the name "python-blis".

- Artyom

References:
1. "Fast matrix-multiplication as a self-contained Python library"
   https://github.com/explosion/cython-blis
[0001-gnu-Add-python-blis.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55565; Package guix-patches. (Fri, 27 May 2022 21:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 55565 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 55565 <at> debbugs.gnu.org
Subject: Re: bug#55565: [PATCH] gnu: Add python-blis
Date: Fri, 27 May 2022 23:23:22 +0200
Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com> skribis:

> From 3d22d0e5f7929ac1b782217ec207a5e462316c66 Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
> Date: Sun, 22 May 2022 01:14:26 +0300
> Subject: [PATCH] gnu: Add python-blis
>
> * gnu/packages/python-xyz.scm (python-blis): New variable.

[...]

> +    (native-inputs (list python-pytest python-cython))
> +    (inputs (list python python-numpy python-hypothesis))
> +    (arguments
> +     ;; XXX: Tests are failing with the following error:
> +     ;; AttributeError: module 'numpy.__config__' has no attribute 'blas_ilp64_opt_info'
> +     (list #:tests? #f))

Doesn’t that failure suggest something’s really wrong?  Seems worth
investigating.

> +    (home-page "https://github.com/explosion/cython-blis")
> +    (synopsis "Fast matrix-multiplication Python library")
> +    (description
> +     "This package provides the @url{https://github.com/flame/blis,
> +Blis linear algebra} routines as a self-contained Python C-extension.")

Blis isn’t listed in ‘inputs’, and apparently that’s because it’s
bundled.

Could you “unbundle” it?  That is, add Blis as an input, make sure it
gets used during the build process, and remove the bundled copy.

Thanks in advance,
Ludo’.





Information forwarded to guix-patches <at> gnu.org:
bug#55565; Package guix-patches. (Sat, 11 Jun 2022 10:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 55565 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55565 <at> debbugs.gnu.org
Subject: Re: bug#55565: [PATCH] gnu: Add python-blis
Date: Sat, 11 Jun 2022 13:44:34 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

thanks for the feedback.

I tried to fix the patch and got some promising results.  Please find
the updated patch attached.

Basically I patched 'blis/benchmark.py' to use "blas_opt_info" instead
of "blas_ilp64_opt_info" and tests went fine.  An issue with different
numpy versions I guess?  I also added "blis" and "python-numpy-next" to
the "native-inputs".

- Artyom
[0001-gnu-Add-python-blis.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55565; Package guix-patches. (Mon, 13 Jun 2022 10:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 55565 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 55565 <at> debbugs.gnu.org
Subject: Re: bug#55565: [PATCH] gnu: Add python-blis
Date: Mon, 13 Jun 2022 12:20:18 +0200
Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com> skribis:

> Basically I patched 'blis/benchmark.py' to use "blas_opt_info" instead
> of "blas_ilp64_opt_info" and tests went fine.  An issue with different
> numpy versions I guess?  I also added "blis" and "python-numpy-next" to
> the "native-inputs".

Unfortunately this is not sufficient: the source bundles a copy of BLIS
under ‘blis/_src’ and it starts by building it (which is why it takes so
long), whether or not BLIS is among the inputs.

Could you (1) add a snippet that removes ‘blis/_src’, and (2) see
whether/how ‘setup.py’ can be patched to not build BLIS?  It might be
that commenting out the line that reads:

    cmdclass={"build_ext": ExtensionBuilder},

would be enough, I don’t know.

Anyhow, given that BLIS is the kind of package that’s highly tuned on
our side for performance and reproducibility configuration, it’s
important to not have several copies around.

> +    (native-inputs (list python-numpy-next
> +                         python-pytest
> +                         python-cython
> +                         blis
> +                         python-hypothesis))

NumPy and BLIS should definitely be ‘inputs’, not ‘native-inputs’; not
sure about ‘hypothesis’.

Also, please include a short comment explaining why numpy-next is used
rather than numpy (like “version >= X.Y required”).

Could you send an updated patch?

Sorry that this is providing trickier than we’d like!

Thanks,
Ludo’.




Reply sent to Vagrant Cascadian <vagrant <at> debian.org>:
You have taken responsibility. (Sat, 02 Sep 2023 00:02:02 GMT) Full text and rfc822 format available.

Notification sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
bug acknowledged by developer. (Sat, 02 Sep 2023 00:02:02 GMT) Full text and rfc822 format available.

Message #19 received at 55565-done <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>, 55565-done <at> debbugs.gnu.org
Subject: Re: [bug#55565] [PATCH] gnu: Add python-blis
Date: Fri, 01 Sep 2023 17:00:47 -0700
[Message part 1 (text/plain, inline)]
On 2022-05-22, Artyom V. Poptsov wrote:
> Subject: [PATCH] gnu: Add python-blis
>
> * gnu/packages/python-xyz.scm (python-blis): New variable.
...
> +(define-public python-blis
> +  (package
> +    (name "python-blis")
> +    (version "0.9.0")

python-blis 0.9.1 was added in:

069618522d3ee040e0b0f2d9f24ceb763ce434aa gnu: Add python-blis.

Marking as done.

live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 11:24:23 GMT) Full text and rfc822 format available.

This bug report was last modified 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.