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

[Operator] premute for reduction tensors & welford var_mean #64

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

StrongSpoon
Copy link
Collaborator

@StrongSpoon StrongSpoon commented Jun 13, 2024

  1. implement Welford var_mean and two-pass kernels to take place of the low-perf var_meak_kernel
  2. implement compress_dim function for multiple reduction dims
  3. remove the limit of commit python version

@StrongSpoon StrongSpoon force-pushed the dev_lzx branch 2 times, most recently from 8d65929 to 27ba565 Compare June 14, 2024 06:12
@StrongSpoon StrongSpoon marked this pull request as ready for review June 14, 2024 06:40
@StrongSpoon StrongSpoon changed the title [Draft] premute for reduction tensors & welford var_mean [Operator] premute for reduction tensors & welford var_mean Jun 14, 2024
Copy link
Contributor

@tongxin tongxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@@ -135,8 +132,7 @@ def all_dims(inp, dim=None, keepdim=False):

shape = list(inp.shape)
dim = [d % inp.ndim for d in dim]
order = [i for i in range(inp.ndim) if i not in dim] + dim
inp = inp.permute(order).contiguous()
inp = dim_compress(inp, dim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like merge_dims or coalesce_dims might be better names?

@StrongSpoon StrongSpoon merged commit 9a0ba3f into master Jun 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants