-
Notifications
You must be signed in to change notification settings - Fork 124
Always use translated command-lists #1831
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
Always use translated command-lists #1831
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please test this with ZE_ENABLE_LOADER_INTERCEPT=1 set. I have a suspicion that you can't just use a translated handles in regular APIs.
| auto Platform = CommandBuffer->Context->getPlatform(); | ||
| ZE2UR_CALL( | ||
| Platform->ZeMutableCmdListExt.zexCommandListUpdateMutableCommandsExp, | ||
| (CommandBuffer->ZeComputeCommandListTranslated, &MutableCommandDesc)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need the translated compute command list handle. Any call to an extension function pointer requires all handles used are translated.
| &ZeMutableCommandDesc, &CommandId)); | ||
| ZE2UR_CALL( | ||
| Platform->ZeMutableCmdListExt.zexCommandListGetNextCommandIdExp, | ||
| (CommandBuffer->ZeComputeCommandList, &ZeMutableCommandDesc, &CommandId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail, you need to translate both handles, not just the copy above. This will break the code.
nrspruit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect, translated handles can only be used on EXP function pointers retrieved from the driver, they will cause segfaults if used on normal apis and one is running with multiple drivers.
|
Closing due to review feedback mentioning that this won't work. |
Updates the implementation of command-buffers to use translated command-list handles in every API call instead of only using them for experimental L0 API's. This avoids having to keep track of 2 separate command-list handles which can be confusing.