Skip to content

partr thread support for openblas #32786

@ViralBShah

Description

@ViralBShah

Here are some notes from digging into the openblas codebase (with @stevengj) to enable partr threading support.

  1. exec_blas is called by all the routines. The code pattern followed is setting up the work queue and calling exec_blas to do all the work through an openmp pragma.
  2. The exception is lapack routines, which also use the exec_blas_async functions.
  3. The openmp backend doesn’t seem to implement the async and thus I believe that it will not multi-thread the lapack calls.
  4. Windows has its own threading backend

The easiest way may be to modify the openmp threading backend, which seems amenable to something like the fftw partr backend. To start with, we should ignore lapack threading. We could probably just implement an exec_blas_async fallback that calls exec_blas (and make exec_blas_async_wait a no-op).

All of this should work on windows too, although the going through the openmp build route may need some work on the makefiles.

The patch to FFTW should be indicative of something similar to be done for the openblas build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions