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

[Breaking] Adding reductions across multiple axes #194

Merged
merged 27 commits into from
Oct 2, 2022
Merged

Conversation

coreylowman
Copy link
Owner

@coreylowman coreylowman commented Sep 28, 2022

Adds ability to call reductions along multiple axes. 🎉

This achieves two things mainly:

  1. All reductions can now be used for any amount of axes
  2. Makes reductions consistent with broadcast, where the output type is used to infer axes.

Closes #163

Breaking Changes

  • Remove -1 from valid axes, add trait HasLastAxis to use in generic functions instead
  • Making full reduction functions generic over axes: mean, sum, max, min
  • Adding fully generic versions: normalize, stddev, var
  • Tensor methods for reductions can infer axes & output type similar to .broadcast().
  • Removing single axis reduction functions fn *_axis():
    • mean_axis
    • sum_axis,
    • max_axis
    • min_axis
    • normalize_axis
    • std_axis
    • var_axis
  • Rename HasAxis to HasAxes
  • Rename Broadcast to BroadcastTo

Non breaking changes

  • Adding AllAxes & removing device reduce all

@coreylowman coreylowman added the breaking-change Semver breaking change label Sep 28, 2022
@coreylowman coreylowman marked this pull request as draft September 28, 2022 13:18
@coreylowman coreylowman marked this pull request as ready for review September 28, 2022 21:18
@coreylowman coreylowman merged commit 22a204d into main Oct 2, 2022
@coreylowman coreylowman deleted the reduce-axes branch October 2, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Semver breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add reductions across multiple axes
1 participant