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

Clarify what accessible means for zeCommandListAppendMemoryCopy #236

Open
wdamon-intel opened this issue Oct 13, 2023 · 1 comment
Open
Labels
API: Core documentation Improvements or additions to documentation needs discussion

Comments

@wdamon-intel
Copy link
Contributor

Currently, the spec reads:

The application must ensure the memory pointed to by dstptr and srcptr is accessible by the device on which the command list was created.

However, it is easy to misunderstand "accessible" to have a more-narrow-than-intended meaning, especially when coming from the perspective of another popular compute API.

The suggestion here is to modify the spec language to clarify that the device which will be doing the transfer understands both the source and destination pointers, including in peer-to-peer access scenarios. For example,

The application must ensure the memory pointed to by dstptr and srcptr is accessible by the device on which the command list was created. This may include peer-to-peer access where available.

This might also be something to clarify for the other APIs that accept a source and destination pointer that uses similar language in the spec.

@wdamon-intel wdamon-intel added documentation Improvements or additions to documentation API: Core needs discussion labels Oct 13, 2023
@jandres742
Copy link

@wdamon-intel : we have this table in the Memory section https://spec.oneapi.io/level-zero/latest/core/PROG.html#memory

Name Initial Location Accessible By   Migratable To  
Host Host Host Yes Host N/A
Any Device Yes (perhaps over PCIe) Device No
Device Specific Device Host No Host No
Specific Device Yes Device N/A
Another Device Optional (may require p2p) Another Device No
Shared Host, Specific Device, or Unspecified Host Yes Host Yes
Specific Device Yes Device Yes
Another Device Optional (may require p2p) Another Device Optional
Shared System Host Host Yes Host Yes
Device Yes Device Yes

A

This table defines what accessible means, including P2P access. If there's any need to clarify the behavior of zeCopy operations, then either a link to the table can be posted on each of those interfaces, or a section in programming guide needs to make clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Core documentation Improvements or additions to documentation needs discussion
Projects
None yet
Development

No branches or pull requests

2 participants