Skip to content

Propagate symmetries through broadcasts #42

@wiwu2390

Description

@wiwu2390
  1. Propagate symmetries through broadcasts by taking the product of the existing symmetry group on the original indices with the full permutation group on the broadcast indices.
  2. Apply this logic to auto-broadcast arguments of pointwise ops

Example:

A = we.random.randn(n, n, n, n)
A = we.symmetrize(A, group=we.PermutationGroup.symmetric(4,axes=(0,1,2,3)))
B = we.random.randn(n, n)
B = we.symmetrize(B, group=we.PermutationGroup.symmetric(2,axes=(0,1)))
B_bc = we.broadcast_to(B, A.shape)   # Should have symmetric_axes=((0,1), (2,3))
C = A * B  # Should have symmetric_axes=((0,1), (2,3))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:p1Ship in the current iteration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions