Skip to content

Conversation

dm-vodopyanov
Copy link
Contributor

No description provided.

@dm-vodopyanov dm-vodopyanov requested a review from a team as a code owner October 7, 2025 16:20
This function will allocate a memory region aimed to be used for
two-dimensional images. It allocates memory that is guaranteed to
adhere to the device's alignment requirements for USM images.
adhere to the device's alignment requirements for USM images. E.g.,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that we need to clarify the pitched_alloc_device API entry point, because it is guaranteed to return the right thing for a user.

What we should clarify is a case described below, where user does not wish to use the pitched_alloc_device, but instead another USM allocation function which on its own may not follow any requirements for images.

I would maybe suggest renaming the section into "Alignment restrictions and queries" to generalize it and add a paragraph (either at the beginning, or at the end) saying that base USM pointer that use used as a storage for an image may have additional backend-specific requirements for the alignment. For example, for OpenCL and Level Zero backend the base USM pointer that is used as an image storage must be aligned to a pixel size.

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