This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The algorithm proposed by https://github.com/triton-lang/triton/pull/7558 | |
| from dataclasses import dataclass | |
| from enum import Enum | |
| def inverse_permutation(P): | |
| """ | |
| Given a permutation P, return its inverse permutation. | |
| """ |