Skip to content

[UR][L0] Add the multi-device-compile experimental feature #924

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

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Oct 3, 2023

Instead of relying on the list of devices used to create a context, provide interfaces which instead take a list of devices. This more closely aligns with PI and OpenCL. Introduced to workaround a regression. May be superseded in future.

Pull's in the changes in #919 to the main branch.

@jandres742
Copy link

we have now 3 similar PRs for this

#919
#924
#934

which one we will be using?

@kbenzie
Copy link
Contributor Author

kbenzie commented Oct 10, 2023

All of them? They don't do the same things.

@jandres742
Copy link

All of them? They don't do the same things.

thanks @kbenzie for the clarification.

UR_APIEXPORT ur_result_t UR_APICALL
urProgramBuildExp(
ur_program_handle_t hProgram, ///< [in] Handle of the program to build.
uint32_t numDevices, ///< [in] number of devices

Choose a reason for hiding this comment

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

we could say here that if numDevices is 0, then urProgramBuildExp would be have the same as urProgramBuild, where the program is built for all the devices in the context.

piProgramBuild receives a list of devices, while urProgramBuild
does not. This produces a series of issues when a UR program
needs to be created for a specific device.

So define a new API, called urProgramBuildExp to pass this
list.

Authored-by: [email protected]
@kbenzie kbenzie force-pushed the benie/multi-device-compile branch from 73e9e32 to c16a5ce Compare October 26, 2023 14:08
Expand upon the introduction of `urProgramBuildExp` and include
`urProgramCompileExp` and `urProgramLinkExp` which include a device-list
in place of a context. These more closely align with the PI/OpenCL
analogues but only to introduce device-lists, not all extant arguments
from those entry-points. This patch also moves the `urProgramBuildExp`
definition into an experimental feature file and introduces a brief
document containing motivation.
@kbenzie kbenzie force-pushed the benie/multi-device-compile branch from c16a5ce to c90b27b Compare October 26, 2023 14:09
@kbenzie kbenzie merged commit 63aaf07 into oneapi-src:main Oct 27, 2023
@kbenzie kbenzie deleted the benie/multi-device-compile branch January 29, 2024 13:50
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.

5 participants