Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/openblas: allow disabling multithreading
Date: Tue, 5 Jan 2021 15:51:42 +0100	[thread overview]
Message-ID: <20210105155142.5c40b74b@windsurf.home> (raw)
In-Reply-To: <CAAXf6LVWOhFzBERunt5OdHhDkaKG1OGR4dxEzr48v52da7gJ-w@mail.gmail.com>

On Tue, 5 Jan 2021 15:19:22 +0100
Thomas De Schampheleire <patrickdepinguin@gmail.com> wrote:

> First of all, best wishes for 2021 and thanks for applying my patches recently!

Best wishes to you as well!

> > Should this instead be:
> >
> >         depends on !BR2_PACKAGE_OPENBLAS_USE_THREAD
> >
> > indeed, as you're explaining in the help text, when USE_THREAD=1, the
> > USE_LOCKING option has no effect, as it is forcefully enabled.  
> 
> We can indeed add this inverse dependency on
> BR2_PACKAGE_OPENBLAS_USE_THREAD, this is more clear.
> However, I think we also have to retain the dependency on
> BR2_TOOLCHAIN_HAS_THREADS, right? Because if there is no thread
> support, it does not make sense to lock.
> If only depending on !BR2_PACKAGE_OPENBLAS_USE_THREAD, then the
> USE_LOCKING option becomes visible if !BR2_TOOLCHAIN_HAS_THREADS .
> Right?

Right, seems a good idea.

> > And perhaps drop the "default y" ?  
> 
> I added 'default y' because the introduction of USE_LOCKING in
> openblas actually lead to a regression if you were using it in
> single-threaded mode from a multi-threaded application. The regression
> is only at run-time and causes incorrect math results in some cases
> (ugh!).
> So, the 'default y' would help existing users in this situation when
> upgrading Buildroot and its contained openblas.
> 
> We could remove the 'default y' too. In my own repo I can make sure to
> enable USE_LOCKING explicitly. This may be fine if we assume there are
> few users that use openblas, and even fewer that use it in
> single-threaded mode from a multithreaded application.

Right, fair enough with "default y" then.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2021-01-05 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 14:50 [Buildroot] [PATCH] package/openblas: allow disabling multithreading Thomas De Schampheleire
2021-01-02 16:34 ` Thomas Petazzoni
2021-01-05 14:19   ` Thomas De Schampheleire
2021-01-05 14:51     ` Thomas Petazzoni [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-04 13:37 Thomas De Schampheleire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105155142.5c40b74b@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox