Skip to content

Add permutation parity analysis helpers#18

Merged
jduprat merged 2 commits into
facebookresearch:mainfrom
neuralsorcerer:ppa
Apr 28, 2026
Merged

Add permutation parity analysis helpers#18
jduprat merged 2 commits into
facebookresearch:mainfrom
neuralsorcerer:ppa

Conversation

@neuralsorcerer
Copy link
Copy Markdown
Contributor

Added two new permutation-analysis APIs in tensor_layouts.analysis: permutation_parity(layout) (returns +1 for even permutations, -1 for odd) and is_even_permutation(layout) (boolean convenience wrapper). These are implemented on top of the existing cycle decomposition so they share the same dense/injective validation behavior as cycles and order.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 25, 2026
@jduprat jduprat merged commit 8c75af6 into facebookresearch:main Apr 28, 2026
9 checks passed
@neuralsorcerer neuralsorcerer deleted the ppa branch April 28, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants