Skip to content

Conversation

@densamoilov
Copy link
Contributor

Multiple tags can correspond to the same physical layout when unit dimensions are present; therefore, we cannot rely on tags in cases where it matters. The newly introduced is_canonical() function can be used to perform certain checks in a robust way.

Fixes MFDNN-14321.

@densamoilov densamoilov requested review from a team as code owners October 24, 2025 23:32
@github-actions github-actions bot added platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64 component:common labels Oct 24, 2025
@densamoilov densamoilov force-pushed the dsamoylo/main/fix-md-check branch 2 times, most recently from 940aa48 to 5f915a5 Compare October 24, 2025 23:38
Multiple tags can correspond to the same physical layout when unit
dimensions are present; therefore, we cannot rely on tags in cases
where it matters. The newly introduced `is_canonical()` function can
be used to perform certain checks in a robust way.
@densamoilov densamoilov force-pushed the dsamoylo/main/fix-md-check branch from 5f915a5 to 873ef15 Compare October 24, 2025 23:47

if (normalized_ndims == 0) return true;

int expected_stride = 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(reminder for myself) use dim_t instead of int

}
}

if (normalized_ndims == 0) return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit):

Suggested change
if (normalized_ndims == 0) return true;
if (!normalized_ndims) return true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:common platform:cpu-x64 Intel64/AMD64 processors. Codeowner: @oneapi-src/onednn-cpu-x64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants