Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P1673 A free function linear algebra interface based on the BLAS #557

Open
wg21bot opened this issue Jun 28, 2019 · 24 comments
Open

P1673 A free function linear algebra interface based on the BLAS #557

wg21bot opened this issue Jun 28, 2019 · 24 comments
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 IS Ship vehicle: IS LEWG Library Evolution linear-algebra Linear algebra needs-revision Paper needs changes before it can proceed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting size - huge paper size estimate, biggest size
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Jun 28, 2019

P1673R0 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman, Christian Trott, Daniel Sunderland, Nevin Liber, Siva Rajamanickam, Li-Ta Lo, Graham Lopez, Peter Caday, Sarah Knepper, Piotr Luszczek, Timothy Costa)

@wg21bot wg21bot added this to the 2019-07 milestone Jun 28, 2019
@wg21bot wg21bot added LEWG Library Evolution SG14 Low Latency SG19 Machine Learning SG6 Numerics labels Jun 28, 2019
@tituswinters
Copy link
Collaborator

tituswinters commented Jul 8, 2019

This R0 needs to be forwarded by some/all of the relevant SGs before going to LEWG for design review. Removing the LEWG label.

@tituswinters tituswinters removed the LEWG Library Evolution label Jul 8, 2019
@brycelelbach brycelelbach added LEWGI Library Evolution Incubator linear-algebra Linear algebra labels Jul 12, 2019
@brycelelbach
Copy link
Collaborator

brycelelbach commented Jul 12, 2019

Mark, if you want some early design review, we can look at this in LEWGI.

@brycelelbach
Copy link
Collaborator

brycelelbach commented Jul 16, 2019

Cologne 2019-07 LEWGI Minutes

P1673R0 & P1674R0 C++ BLAS Library: Design Feedback

Champion: Christian Trott

Minute Taker: Tobias Loew

Start Overview: 07-16 8:52

Start Review: 9:20

Algorithms are parameterized on a concept, iterators. The proposed linear algebra algorithms are parameterized on a concrete view type, mdspan.

Do people need to spell scaled_scalar? Can it just be an implementation-defined type with certain properties.

SG1 needs to review this from a parallelization/vectorization angle.

How should we handle outputs in the API?

Explore a range-style lazy view API.

End: 10:17

CONSENSUS: Bring a revision of P1673R0, exploring conceptification of mdspan and a range-style lazy API, to LEWGI for further design feedback.

@brycelelbach brycelelbach added the needs-revision Paper needs changes before it can proceed label Jul 17, 2019
@jensmaurer jensmaurer removed this from the 2019-07 milestone Aug 23, 2019
@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 15, 2019

P1673R1 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman, Christian Trott, Daniel Sunderland, Nevin Liber, Siva Rajamanickam, Li-Ta Lo, Graham Lopez, Peter Caday, Sarah Knepper, Piotr Luszczek, Timothy Costa)

@wg21bot wg21bot added this to the 2019-11 milestone Oct 15, 2019
@jensmaurer jensmaurer removed the needs-revision Paper needs changes before it can proceed label Oct 20, 2019
@Cpp-Lisa
Copy link
Collaborator

Cpp-Lisa commented Nov 4, 2019

Removing SG6 tag

@Cpp-Lisa Cpp-Lisa removed the SG6 Numerics label Nov 4, 2019
@brycelelbach brycelelbach added the SG1 Concurrency label Nov 5, 2019
@brycelelbach
Copy link
Collaborator

brycelelbach commented Nov 5, 2019

Note that the LEWGI feedback from Cologne didn't make it clear that SG1 needs to see this, but they certainly do. Sorry, my mistake.

@brycelelbach brycelelbach removed SG14 Low Latency SG19 Machine Learning labels Nov 5, 2019
@brycelelbach
Copy link
Collaborator

brycelelbach commented Nov 5, 2019

This was forwarded to LEWG by SG14 at Cologne.

@brycelelbach brycelelbach added LEWG Library Evolution and removed LEWGI Library Evolution Incubator SG1 Concurrency labels Nov 6, 2019
@brycelelbach
Copy link
Collaborator

brycelelbach commented Nov 6, 2019

Belfast 2019-11 LEWGI Minutes

P1673R1 Free Function Linear Algebra Library

Champion: Mark Hoemmen

Minute Taker: Andreas Weis

Start Review: 11-05 8:55

Are the algorithms inplace (like sort) or non-modifying (like transform)?

Should dimensional errors be checked? If we know them all at compile time, we should check them.

Make these constexpr? May not be possible/easy in version 1 - constexprification is ongoing, and you may have dependencies on that.

Walking through the matrix multiply code example was very useful.

Add more examples showing the use of the views.

Do we need to have the mdarray overloads in version 1?

Start Polling: 10:12

POLL: We are comfortable with the design of "mdspan transformations" in P1673 (scaled_view, transpose_view, etc).

Strongly For Weakly For Neutral Weakly Against Strongly Against
0 11 0 0 1

Attendance: 16

That's got consensus.

POLL: Dimensional errors should be checked at compile time (e.g. Mandates clauses) if all dimensions are known at compile time; otherwise, they should be preconditions (e.g. Expects clauses).

NO OBJECTION TO UNANIMOUS CONSENT

Attendance: 16

POLL: Making the linear algebra algorithms in P1673 constexpr should be a priority for the initial release.

Strongly For Weakly For Neutral Weakly Against Strongly Against
1 2 7 3 0

Attendance: 16

No consensus.

POLL: mdarray overloads should be a priority for the initial release.

Strongly For Weakly For Neutral Weakly Against Strongly Against
1 1 4 3 1

Attendance: 17

Weak consensus against.

POLL: Conceptifying input and output arguments should be a priority for the initial release.

Strongly For Weakly For Neutral Weakly Against Strongly Against
1 2 3 3 1

Attendance: 16

No consensus.

Break: 10:22

Resume: 10:44

Start Polling: 11:15

POLL: Packed layouts are a priority for the initial release.

Strongly For Weakly For Neutral Weakly Against Strongly Against
3 6 4 0 1

Attendance: 18

SA: I want to start with something as simple as possible.

That has consensus.

POLL: We are comfortable with the design of layout_blas_general and layout_blas_packed in P1673.

NO OBJECTION TO UNANIMOUS CONSENT

Attendance: 18

POLL: Linear algebra algorithms that produce a single scalar output should return the output.

Strongly For Weakly For Neutral Weakly Against Strongly Against
2 8 2 1 2

Attendance: 18

That has consensus.

POLL: The intermediate type used for reduction-style linear algebra algorithms should be the type of the initial value, or the element type derived from the inputs if there is no initial value (e.g. what std::reduce/std::accumulate does).

Strongly For Weakly For Neutral Weakly Against Strongly Against
2 7 3 1 0

Attendance: 18

That has consensus.

A: I want an explicit template parameter.

POLL: Send P1673 (Free Function Linear Algebra Library) to LEWG and SG1.

Strongly For Weakly For Neutral Weakly Against Strongly Against
12 1 3 0 0

Attendance: 18

That has consensus.

After speaking with the SG1 chair, SG1 doesn't need to see this.

End: 11:31

CONSENSUS: LEWGI sends P1673R1 (Free Function Linear Algebra Library), with the guidance below, to LEWG.

  • Add the walkthrough of the matrix multiply code to the presentation.
  • Add more examples showing the use of mdspan transformations.
  • Rename "mdspan views" in the paper to something else (such as "mdspan transformations").
  • Propose batched linear algebra in a separate paper, not this one.
  • Remove mdarray overloads.
  • Check dimensional errors at compile time (e.g. Mandates clauses) if all dimensions are known at compile time; otherwise, make them precondition violations (e.g. Expects clauses).
  • Make linear algebra algorithms that produce a single scalar output return that output.
  • Make the intermediate type used for reduction-style linear algebra algorithms the type of the initial value, or the element type derived from the inputs if there is no initial value (e.g. what std::reduce/std::accumulate does).

@jensmaurer jensmaurer modified the milestones: 2019-11, 2020-02 Jan 3, 2020
@wg21bot
Copy link
Collaborator Author

wg21bot commented Jan 18, 2020

P1673R2 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman, Christian Trott, Daniel Sunderland, Nevin Liber, Siva Rajamanickam, Li-Ta Lo, Damien Lebrun-Grandie, Graham Lopez, Peter Caday, Sarah Knepper, Piotr Luszczek, Timothy Costa)

@brycelelbach brycelelbach added needs-revision Paper needs changes before it can proceed and removed scheduled-for-library-evolution This paper has been scheduled for either a Library Evolution mailing list or meeting review labels Jun 22, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Aug 23, 2021

P1673R4 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Aug 23, 2021
@brycelelbach brycelelbach added the size - huge paper size estimate, biggest size label Sep 18, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 26, 2021

P1673R5 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@brycelelbach brycelelbach added the C++26 Targeted at C++26 label Nov 3, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Dec 18, 2021

P1673R6 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@jensmaurer jensmaurer modified the milestones: 2021-telecon, 2022-telecon Jan 1, 2022
@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for either a Library Evolution mailing list or meeting review label Apr 1, 2022
@wg21bot
Copy link
Collaborator Author

wg21bot commented Apr 25, 2022

P1673R7 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@brycelelbach
Copy link
Collaborator

brycelelbach commented Apr 26, 2022

2022-04-26 Library Evolution Telecon

P1673R7: Linear Algebra

2022-04-26 Library Evolution Telecon Minutes

Chair: Fabio Fracassi

Minute Taker: Inbal Levi

Champion: Mark Hoemmen

Summary

The Paper was presented in a detailed High level overview.

Next Steps

Discussion will continue in a future telecon

@wg21bot
Copy link
Collaborator Author

wg21bot commented May 24, 2022

P1673R8 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia Klinvex,Li-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@brycelelbach
Copy link
Collaborator

brycelelbach commented Jun 2, 2022

2022-05-24 Library Evolution Telecon

P1673R8: Linear Algebra

2022-05-24 Library Evolution Telecon Minutes

Chair: Fabio Fracassi

Minute Taker: Ben Craig

Champion: Mark Hoemmen

Summary

High level design overview has been continued and finished.

The design of BLAS views has been analysed in some detail.
There was no opposition to this design.
BLAS views do not share the same ownership problems that earlier designs in the realm of expression templates had, and its ownership model has precedence in range views.

We also want the full set of BLAS1 operations, even though some of the operations could be expressed in terms of more generic (range) algorithms. The full set is more ergonomic (especially for users already familiar with BLAS) and offers easier optimisation opportunities .

LAs conjugation conj needs to be analysed how it acts as a customization point.

Next Steps

Update the paper and return to Library Evolution for additional review.

@mattkretz
Copy link
Collaborator

mattkretz commented Jun 13, 2022

2022-06-09 SG6 Telecon

D1673R9: A free function linear algebra interface based on the BLAS

2022-06-09 SG6 Telecon Minutes

Chair: Matthias Kretz

Champion: Mark Hoemmen

Minute Taker: John McFarlane

no quorum; no polls taken; no objections to below statements on conj on SG6
reflector

Summary

  • Support for custom complex number types (std::conj "customization")?

    Not only complex numbers require conjugation. (quaternions, dual numbers,
    ...) I.e. there's no obvious type constraint.

    SG6 position on conj:

    1. The feature (conjugated(A) or conjugate_transposed(A) of matrix or vector
      of user-defined types) is reasonably integral to the proposal; we generically
      oppose deferring it based on the hope that we’ll be able to specify it in a
      nicer way in the future [with new customization point syntax].

    2. There exists a simple rule, which is one possible path forward, we’re
      pointing out its simplicity because it engenders teachability: Do ADL-ONLY
      lookup (preventing finding std::conj for primitive types) for conj (as
      with ranges); if you find something you use it, and if you don’t, you do
      nothing. (“Primitives aren’t that special.” Benefit is that custom real types
      work out of the box.)

    3. The alternative: say that if you choose to use conjugated or
      conjugate_transposed, that you MUST supply the conj ADL-findable thing,
      else ill-formed; this is a safety mechanism that may not have been considered
      previously by LEWG. (Make primitives special, to regain safety. The cost is
      that custom real types need to have a conj ADL-findable, if you’re using
      conjugated or conjugate_transposed.)

  • How to perform generic division (left vs. right division)?

    • Left division vs. right division could be chosen by the caller by providing
      a division BinaryOp parameter. If none is given, operator/ is used.

    • Explore tying the division op to DiagonalStorage.

@wg21bot
Copy link
Collaborator Author

wg21bot commented Jun 24, 2022

P1673R9 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@brycelelbach
Copy link
Collaborator

brycelelbach commented Aug 2, 2022

2022-07-05 Library Evolution Telecon

P1673R9R9: Linear Algebra

2022-07-05 Library Evolution Telecon Minutes

Chair: Fabio Fracassi

Minute Taker: Inbal Levi

Champion: Mark Hoemmen

Summary

No polls were taken.

Next Steps

Review will proceed in a breakout task group.

@brycelelbach brycelelbach added needs-revision Paper needs changes before it can proceed and removed scheduled-for-library-evolution This paper has been scheduled for either a Library Evolution mailing list or meeting review labels Aug 2, 2022
@brycelelbach brycelelbach removed the needs-revision Paper needs changes before it can proceed label Sep 23, 2022
@brycelelbach brycelelbach modified the milestones: 2022-telecon, 2022-11 Sep 23, 2022
@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 17, 2022

P1673R10 A free function linear algebra interface based on the BLAS (Mark Hoemmen, Daisy Hollman,Christian Trott,Daniel Sunderland,Nevin Liber,Alicia KlinvexLi-Ta Lo,Damien Lebrun-Grandie,Graham Lopez,Peter Caday,Sarah Knepper,Piotr Luszczek,Timothy Costa)

@wg21bot wg21bot modified the milestones: 2022-11, 2022-telecon Oct 17, 2022
@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for either a Library Evolution mailing list or meeting review label Nov 7, 2022
@FabioFracassi
Copy link
Collaborator

FabioFracassi commented Nov 10, 2022

2022-11-10 13:00 to 15:00 UTC-10 Kona Library Evolution Meeting

P1673R10: A free function linear algebra interface based on the BLAS

2022-11-10 13:00 to 15:00 UTC-10 Kona Library Evolution Minutes

Champion: Christian Trott (in-person)

Chair: Bryce Adelstein Lelbach & Corentin Jabot

Minute Taker: Steve Downey

Start: 2022-11-10 13:10 UTC-10

Could in_vector_t be a contiguous range? No, we need access to things like stride.

Open Questions:

  • Conceptification.
    • Of element types.
    • Of mdspans.
  • Named type requirements vs concepts for expressing constraints.
  • get_mdspan customization point.
  • Interoperability with P1385.
  • What and how should we specify that the operations do?

Action Items:

  • Use CamelCase for the type requirement names.
  • Remove the _t from the type requirement names.
  • Rename the named type requirements to avoid matrix/vector terminology to avoid conflicts with P1385.
  • Explore expressing constraints with concepts instead of named type requirements.

POLL: The specification of linear algebra algorithms can be hand-wavy (draft poll not taken).

POLL: The specification of linear algebra algorithms can be in terms of operators that must exist (draft poll not taken).

David Stone formulated the options for this poll.

POLL: The description of linear algebra algorithms should be (vote for the options you can tolerate, vote as many times as you like):

Options Votes
Syntax only (status quo) 15
Hand wavy do math 27
Do math 2

Break: 15:00

Resume: 15:24

End: 15:57

Next Steps

Revise the paper, with the guidance below, and return to Library Evolution for further design review.

  • Use CamelCase for the type requirement names.
  • Remove the _t from the type requirement names.
  • Rename the named type requirements to avoid matrix/vector terminology to avoid conflicts with P1385.
  • Explore expressing constraints with concepts instead of named type requirements.

@brycelelbach brycelelbach added needs-revision Paper needs changes before it can proceed and removed scheduled-for-library-evolution This paper has been scheduled for either a Library Evolution mailing list or meeting review labels Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 IS Ship vehicle: IS LEWG Library Evolution linear-algebra Linear algebra needs-revision Paper needs changes before it can proceed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting size - huge paper size estimate, biggest size
Projects
Development

No branches or pull requests

7 participants