Skip to content

[FEA]: Use P2322R6 to determine accumulator type in Thrust #153

Description

@gevtushenko

Is this a duplicate?

Area

Thrust

Is your feature request related to a problem? Please describe.

We adopted P2322R6 scheme in CUB (NVIDIA/cub#428), but Thrust still uses accumulator types that are surprising to users and do not follow general C++ rules like integer promotion.

Describe the solution you'd like

We should decide if we'd like to proceed with P2322R6 adoption in Thrust and follow CUB scheme of selecting accumulator types.

Tasks

  • Decide if the silent change of accumulator type is breaking
  • Prepare a list of standard algorithms that specify accumulator types
  • Consider preparing a paper to adopt P2322R6 to standard algorithms

CC: @jrhemstad @dkolsen-pgi

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added
    thrust
    on Jul 12, 2023
  2. self-assigned this
    on Mar 7, 2025
  3. fbusato commented on Mar 10, 2025

    @fbusato
    Contributor

    I did a quick investigation to understand the current status.

    First of all, the adopting of P2322 is considered a breaking change for the following reasons:

    • The resulting data type (and signature) is affected
    • The result of the computation can be different

    The following functionalities (all overloadings) need to update their behavior. (X<N>: num overloadings)

    • inclusive_scan/esxlusive_scan X12
    • inner_product X3
    • transform_reduce X2
    • reduce X6
  4. moved this from Todo to In Progress in CCCLon Mar 11, 2025
  5. moved this from In Progress to In Review in CCCLon Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

thrust

Projects

  • Status
    In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions