cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
647 stars 18 forks source link

P1928 R12 std::simd - Merge data-parallel types from the Parallelism TS 2 #670

Open wg21bot opened 5 years ago

wg21bot commented 5 years ago

P1928R0 Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

ogiroux commented 4 years ago

SG1 in Belfast.

wg21bot commented 2 years ago

P1928R1 Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

ogiroux commented 1 year ago

Poll #1: After significant experience with the TS, we recommend that the next version (the TS version with improvements) of std::simd target the IS (C++26) SF F N A SA 10 8 0 0 0

Unanimous consent

Poll #2: We like all of the recommended changes to std::simd proposed in p1928r1 (Includes making all of std::simd constexpr, and dropping an ABI stable type) SF F N A SA No objection to unanimous consent

Poll #4: Future papers and future revisions of existing papers that target std::simd should go directly to LEWG. (We do not believe there are SG1 issues with std::simd today.) SF F N A SA 9 8 0 0 0

wg21bot commented 1 year ago

P1928R2 Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

mattkretz commented 1 year ago

P1928R3 Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

brycelelbach commented 1 year ago

2023-02-08 Issaquah Library Evolution Meeting

P1928R3: std::simd

2023-02-08 UTC-8 Issaquah Library Evolution Minutes

Champion: Matthias Kretz (IP)

Chair: Bryce Adelstein Lelbach (IP) & Billy Baker (IP) & Robert Leahy (IP)

Minute Taker: Ben Craig (IP) & Inbal Levi (IP)

Start: 2023-02-08 08:32 UTC-8

Does this paper have:

Open Questions:

Future Work:

Poll Ideas:

POLL: Change the default SIMD ABI tag to simd_abi::native instead of simd_abi::compatible.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
16 12 0 0 1

Attendance: 23 (in person) + 20 (remote)

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor.

POLL: Change simd_abi::fixed_size to not recommend implementations make it ABI compatible.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
16 7 1 0 1

Attendance: 23 (in person) + 18 (remote)

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor.

Break: 10:14

Resume: 10:38

__POLL: Make simd::size an integral_constant instead of a static member function.__

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
9 8 7 1 0

Attendance: 21 (in person) + 14 (remote)

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor.

POLL: simd masked operations should look like (vote for as many options as you'd like):

Option Votes
where(u > 0, v).copy_from(ptr) 12
v.copy_from_if(u > 0, ptr) 1
v.copy_from_if(ptr, u > 0) 2
v.copy_from(ptr, u > 0) 14
v.copy_from(u > 0, ptr) 3
v.copy_from_where(u > 0, ptr) 4
v.copy_from_where(ptr, u > 0) 11

Attendance: 24 (in person) + 13 (remote)

# of Authors: 1

POLL: simd masked operations should look like (vote once for your favorite):

Option Votes
where(u > 0, v).copy_from(ptr) 5
v.copy_from(ptr, u > 0) 12
v.copy_from_where(ptr, u > 0) 6

Attendance: 24 (in person) + 13 (remote)

# of Authors: 1

Author Position: v.copy_from_where(ptr, u > 0)

Outcome: Consensus for v.copy_from(ptr, u > 0)

POLL: Make copy_to, copy_from, and the load constructor only do value-preserving conversions by default and require passing a flag to do non-value-preserving conversions.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
14 9 1 0 0

Attendance: 24 (in person) + 13 (remote)

# of Authors: 1

Author Position: SF

Outcome: Strong consensus in favor.

Attendance: 24 (in person) + 13 (remote)

Break: 11:58

Resume: 13:03

POLL: SIMD types and operations should be value preserving, even if that means they're inconsistent with the builtin numeric types.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
3 10 6 3 0

Attendance: 27 (in person) + 9 (remote)

# of Authors: 1

Author Position: WF

Outcome: Consensus in favor

WF: I generally like the direction, in the sense of safety, but I'm not sure of the consequences of such a design.

N: I would rather be consistently wrong than inconsistent.

WA: I don't want to be inconsistent with how things have been for the last 30 years.

WF: I'm not sure if we've evaluated the performance impact of this.

N: Just because we've made a mistake in the past doesn't mean we have to keep making it. I'm not convinced that the new approach is the right thing.

Which of these do we want?

float * simd<double> = simd<double>
float * simd<double> = simd<double>
int * simd<float> = simd<float>
int * simd<float> = simd<double>

POLL: 2 * simd<float> should produce simd<double> (status quo: simd<float>).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
1 5 9 6 1

Attendance: 27 (in person) + 9 (remote)

# of Authors: 1

Author Position: SF

Outcome: No consensus.

N: I want more information. The author should tell me what to do.

N: To some degree I want the value preservation. On the other hand, the common case of using an int literal here leading to simd<double> would be surprising.

Names in this proposal:

simd
simd_mask
is_simd
is_simd_mask
is_simd_flag_type
simd_size
rebind_simd
resize_simd
*is_abi_tag -> is_simd_abi_tag
*element_aligned -> simd_element_aligned
*vector_aligned -> simd_vector_aligned
*overaligned -> simd_overaligned
*memory_alignment -> simd_memory_alignment
min
max
minmax
clamp
reduce
*split
*concat
hmin -> min_element
hmax -> max_element
(all|any)_of

POLL: Put SIMD types and operations into std:: and add the simd_ prefix to SIMD specific things (such as split and vector_aligned).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 5 4 9 2

Attendance: 23 (in person) + 9 (remote)

# of Authors: 1

Author Position: WA

Outcome: No consensus.

POLL: Put SIMD types and operations into a nested namespace in std::.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 7 0 5 9

Attendance: 25 (in person) + 9 (remote)

# of Authors: 1

Author Position: SA

Outcome: No consensus.

POLL: simd should be a range.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 9 5 4 4

Attendance: 25 (in person) + 8 (remote)

# of Authors: 1

Author Position: WF

Outcome: No consensus.

POLL: There should be an explicit way to get a view to a simd.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 12 3 3 0

Attendance: 26 (in person) + 8 (remote)

# of Authors: 1

Author Position: WF

Outcome: Consensus in favor.

POLL: simd should have explicitly named functions for horizontal minimum and horizontal maximum.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 5 7 4 2

Attendance: 25 (in person) + 8 (remote)

# of Authors: 1

Author Position: SF

Outcome: No consensus.

Break: 15:19

Resume: 15:35

__POLL: Rename all_of/ any_of/none_of to reduce_all_of/reduce_any_of/reduce_none_of.__

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 1 1 8 5

Attendance: 22 (in person) + 2 (remote)

# of Authors: 1

Author Position: SA

Outcome: Consensus against.

POLL: Rename all_of/any_of/none_of to reduce_and/reduce_or/reduce_nand.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 6 2 4 3

Attendance: 22 (in person) + 2 (remote)

# of Authors: 1

Author Position: SA

Outcome: No consensus.

__POLL: Rename popcount to reduce_count.__

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 9 2 1 2

Attendance: 22 (in person) + 2 (remote)

# of Authors: 1

Author Position: SF

Outcome: Weak consensus in favor.

POLL: Rename find_first_set/find_last_set to reduce_min_index/reduce_max_index.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
2 7 3 2 3

Attendance: 22 (in person) + 2 (remote)

# of Authors: 1

Author Position: SF

Outcome: Weak consensus in favor.

End: 16:04

Summary

We extensively reviewed P1928, which proposes adding SIMD types and operations from the C++ Parallelism Technical Specification version 2 to the C++ International Standard.

Some of the key topics discussed during our review:

We intend to conduct another extensive review on the next revision at the 2023-06 Varna meeting, with the aim of approving the design and advancing the paper to Library Evolution for C++26.

Next Steps

Bring a revision of P1928R4 (std::simd), with the guidance below, to Library Evolution for further design review:

ben-craig commented 1 year ago

Polling results in P2638 indicate that P1915 needs to remove split and concat

brycelelbach commented 1 year ago

https://wg21.link/P1928R4 will be available in the 2023-05 mailing.

wg21bot commented 1 year ago

P1928R4 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

inbal2l commented 1 year ago

2023-06-13 Library Evolution Varna

P1928R4: Merge data-parallel types from the Parallelism TS 2

2023-06-13 Library Evolution Minutes

2023-06-14 Library Evolution Minutes

2023-06-15 Library Evolution Minutes

Chair: Bryce Adelstein Lelbach, Fabio Fracassi

Champion: Matthias Kretz

Minute Taker(s): Inbal Levi / Mark Zeren / Robert Leahy

Summary

Few direction polls were taken during the discussion.

The paper was voted into C++ 26 on Thursday, 06-15:

POLL: Modify P1928D6 (“simd”) as described above, and then send the revised papre to library for C++26 (to be confirmed with a library evolution electronic poll).

SF F N A SA
16 3 1 0 0

Attendance: 22 (P) + 3 (R)

Author’s position: SF

# of Authors: 1

Outcome: Strong consensus in favor

N: There’s a lot of outstanding TOODs.

TODO: @brycelelbach

Next Steps

Forwarded to LWG for C++ 26 (to be confirmed with electronic poll).

TODO: @brycelelbach

wg21bot commented 1 year ago

P1928R5 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

wg21bot commented 1 year ago

P1928R6 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

wg21bot commented 1 year ago

P1928R7 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

mattkretz commented 11 months ago

P1928R8 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

inbal2l commented 11 months ago

Library Evolution Meeting Kona 2023-11-08

P1928R7: std::simd — merge data -parallel types from the Parallelism TS 2

2023-11-08 Library Evolution Kona 2023 Meeting Minutes

Chair: Billy Baker / Inbal Levi

Champion: Matthias Kretz

Minute Taker: Robert Leahy

Summary

Blog post on the topic of regularity: https://mattkretz.github.io/2023/11/16/preserving-regularity.html

No polls were taken.

Outcome

The discussion brought up using “optional”, author will followup with more investigation before getting back to LEWG for additional discussion.

billy-baker commented 9 months ago

Library Evolution Meeting Kona 2024-01-16

P1928R8: std::simd — merge data -parallel types from the Parallelism TS 2

2024-01-16 Library Evolution Telecon Minutes

Champion: Matthias Kretz

Chair: Billy Baker

Minute Taker: Mark Hoemmen

Summary

Does this paper have:

Poll: Restore the precondition on reduce_min_index(empty_mask) and reduce_max_index(empty_mask) (TS status quo, UB).

SF F N A SA
7 6 1 0 0

Attendance: 18 # of Authors: 1 Author Position: SF Outcome: Strong consensus

Poll: Return an unspecified value on reduce_min_index(empty_mask) and reduce_max_index(empty_mask).

SF F N A SA
0 7 3 1 2

Attendance: 19 # of Authors: 1 Author Position: F Outcome: No consensus.

Poll: Return std::optional from reduce_min_index and reduce_max_index.

SF F N A SA
0 1 2 7 4

Attendance: 19 # of Authors: 1 Author Position: WA Outcome: Consensus against.

WA: Not a bad design. optional is not ergonomic. WF: optional is a vocabulary type. Seems reasonable.

POLL: Modify P1928R8 (Merge data-parallel types from the Parallelism TS 2) by restoring the TS specification for reduce_min_index/reduce_max_inde and adding the change to 16.4.2.3 to list the header, and then send the revised paper to LWG for C++26 to be confirmed with a Library Evolution electronic poll.

SF F N A SA
9 2 0 1 1

Attendance: 19 # of Authors: 1 Author Position: SF Outcome: Strong consensus to forward to electonic polling.

WA: Would be SF if load/store interface did not use single iterators (security) SA: Concerned about the comparison operators and constructors

Action Items:

ACTION: There was a general feeling that the specification of reduce_min_index and reduce_max_index would benefit from erroneous behavior. Using erroneous behavior was not polled since it is not yet in the working draft.

Next Steps

The paper will be updated according to the input and added to the Feb 2024 electronic poll.

wg21bot commented 5 months ago

P1928R9 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

ben-craig commented 4 months ago

2024-06-24 Library Evolution St. Louis Meeting

P1928R9: std::simd - Merge data-parallel types from the Parallelism TS 2

2024-06-24 Library Evolution St. Louis Minutes

Champion: Matthias Kretz

Chair: Ben Craig

Minute Taker: Khalil Estell

Summary

POLL: Skip electronic poll for P1928R9 (std::simd - Merge data-parallel types from the Parallelism TS 2) and send directly to LWG for C++26 classified as B3 (addition).

SF WF N WA SA
14 3 3 0 2

Attendance: 21 in person + 19 remote

# of Authors: 1

Author Position: SF

Outcome: Consensus in favor

Comments: SA: Ok with skipping electronic poll, but concerns on the proposal still hold due to incoherence with rest of the standard library.

SA: Not good with the forwarding process

Next Steps

Forwarded to LWG for C++26 (without an electronic poll). Will be reviewed in LWG.

ben-craig commented 4 months ago

2024-06-28 Library Evolution St. Louis Meeting

P1928R10: std::simd - Merge data-parallel types from the Parallelism TS 2

2024-06-28 Library Evolution St. Louis Minutes

Champion: Matthias Kretz

Chair: Ben Craig & Fabio Fracassi

Minute Taker: Steve Downey

Summary

POLL: Approve presented changes in P1928R10 made due to the resolution of P3275 (which concludes P3275).

No objection to unanimous consent

Attendance: 14 + 5

# of Authors: 1

Next Steps

Send P1928 back to LWG, to be included in C++26 (without an electronic poll).

wg21bot commented 3 months ago

P1928R10 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

wg21bot commented 3 months ago

P1928R11 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)

wg21bot commented 2 weeks ago

P1928R12 std::simd - Merge data-parallel types from the Parallelism TS 2 (Matthias Kretz)