Skip to content

Reductions tracking issue #61417

@heitorschueroff

Description

@heitorschueroff

This issue is for tracking and organizing tasks related to reduction operators. For 1.10 we are focusing on aligning API with the Python Array API Standard and test improvements.

Note that some of the tasks below need further discussion before we decide to commit to them.

API

Reduction operators should implement the Python Array API Standard which includes supporting all data types (unless noted in the documentation otherwise) and performing type promotion. They should be compatible with NumPy where possible (giving higher priority to the Python Array API Standard). Where applicable, they should support reducing over multiple dimensions.

Python Array API Standard

NumPy compatibility

Scalar and empty tensors

Variants

Type Promotion

Testing

Reduction operators have additional structure than other operators such as dim and keepdim parameters which can be exploited to automate testing of many features. To do so, we can create a ReductionInfo subclass of OpInfo and update test_reductions.py to follow the OpInfo pattern. Some example of tests that can be automated are ensuring reduction operators support reducing over multiple dimensions, reducing over nonzero dimensions of empty tensors, and even testing for correctness by providing a reference implementation such as a NumPy equivalent operator.

Bugs

Performance

Feature Requests

Allow specifying a range for dimensions to reduce over

Miscellaneous

cc @mruberry @rgommers @heitorschueroff @gchanan

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: numpyRelated to numpy support, and also numpy compatibility of our operatorsmodule: reductionstrackerA tracking issuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions