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

[aievec] Add vector.transpose to aievec.shuffle lowering #1527

Merged
merged 1 commit into from
May 31, 2024

Conversation

jsetoain
Copy link
Collaborator

No description provided.

for (int64_t i = 0; i < static_cast<int64_t>(perm.size() - 2); ++i)
if (perm[i] != i)
return failure();
if (perm[perm.size() - 1] != static_cast<int64_t>(perm.size() - 2))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we do perm.back() here? It's easier to understand. Also, it seems that vector.transpose doesn't prevent you from creating a 0-D vector and empty permutation attribute, so you might want to check the boundary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Empty and identity permutations fold away, so they can be safely ignored.

@jsetoain jsetoain force-pushed the lower-transpose-4x8-8x4-to-shuffle branch from 48b257e to 25b1f54 Compare May 31, 2024 09:56
@jsetoain jsetoain force-pushed the lower-transpose-4x8-8x4-to-shuffle branch from 25b1f54 to 7ab4ddd Compare May 31, 2024 10:05
Copy link
Collaborator

@jamestcl-amd jamestcl-amd left a comment

Choose a reason for hiding this comment

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

LGTM. As mentioned in the comment, we need a follow-up PR on the support of vector<2x8xi32> or vector<2x32xi8>.

@jsetoain
Copy link
Collaborator Author

jsetoain commented May 31, 2024

LGTM. As mentioned in the comment, we need a follow-up PR on the support of vector<2x8xi32> or vector<2x32xi8>.

Just for the record, there is no shuffle mode for vector<2x8xi32> <-> vector<8x2xi32> nor vector<2x32xi8> <-> vector<32x2xi8>, those cases will need to be handled as a composition of shuffle operations (or using 1024-bit shuffles). I just started diving into the enthralling field of permutation decomposition, let's see where that gets me 😬

@jsetoain jsetoain added this pull request to the merge queue May 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 31, 2024
@jsetoain jsetoain added this pull request to the merge queue May 31, 2024
Merged via the queue into Xilinx:main with commit 6f70bfe May 31, 2024
51 checks passed
@jsetoain jsetoain deleted the lower-transpose-4x8-8x4-to-shuffle branch May 31, 2024 21:29
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.

None yet

2 participants