Skip to content

[fix]: permute_021 copy fix #1993

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

Open
wants to merge 1 commit into
base: 2.5_perf_fix
Choose a base branch
from

Conversation

TennyWang1223
Copy link

fix copy error in permute 021 case

@TennyWang1223 TennyWang1223 requested a review from coderfeli March 24, 2025 10:35
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Mar 24, 2025

Jenkins build for 117fd2e2b3296b0f528e280d5f16a8b6ef9b8d87 commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@@ -150,7 +150,7 @@ bool is_permute_021(TensorIteratorBase &iter) {
is_permute &= input.stride(0) == input.size(2) * input.stride(2);
is_permute &= input.stride(1) == 1;
is_permute &= input.stride(2) >= input.size(1);
is_permute &= output.is_contiguous();
is_permute &= output.is_contiguous() && !input.is_contiguous();

Choose a reason for hiding this comment

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

why shouldn't input be contiguous?

Copy link
Author

Choose a reason for hiding this comment

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

The is_permute_021 function should detect whether the input tensor has its last two dimensions in transposed order. But for input shapes of (n, 1, 1), these are inherently contiguous cases that need to be excluded from consideration

@lcskrishna lcskrishna requested a review from jerrymannil March 28, 2025 02:37
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