Skip to content

Conversation

steffenlarsen
Copy link
Contributor

This commit adds two new experimental parts:

  1. A new UR function urProgramDynamicLinkExp for dynamically linking binaries in built programs. Support for this can be checked by querying UR_DEVICE_INFO_DYNAMIC_LINK_SUPPORT_EXP.
  2. A new flag enum ur_exp_program_flags_t used by exp-multi-device-compile functions. This enum currently only has a single flag UR_EXP_PROGRAM_FLAG_ALLOW_UNRESOLVED_SYMBOLS which instructs the urProgramLinkExp function that unresolved external symbols should be allowed after linking.

This commit adds two new experimental parts:
 1. A new UR function `urProgramDynamicLinkExp` for dynamically linking
    binaries in built programs. Support for this can be checked by
    querying `UR_DEVICE_INFO_DYNAMIC_LINK_SUPPORT_EXP`.
 2. A new flag enum `ur_exp_program_flags_t` used by
    exp-multi-device-compile functions. This enum currently only has a
    single flag `UR_EXP_PROGRAM_FLAG_ALLOW_UNRESOLVED_SYMBOLS` which
    instructs the `urProgramLinkExp` function that unresolved external
    symbols should be allowed after linking.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
pDdiTable->pfnBuildExp = urProgramBuildExp;
pDdiTable->pfnCompileExp = nullptr;
pDdiTable->pfnLinkExp = nullptr;
pDdiTable->pfnDynamicLinkExp = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the offload adapter not provide a value for UR_DEVICE_INFO_DYNAMIC_LINK_SUPPORT_EXP as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good eye! I totally missed this. Most likely because I grepped for UR_DEVICE_INFO_MULTI_DEVICE_COMPILE_SUPPORT_EXP which isn't covered by the offload adapter currently. Neither is UR_DEVICE_INFO_USM_P2P_SUPPORT_EXP I've noticed.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen requested a review from a team as a code owner October 3, 2025 08:33
@steffenlarsen steffenlarsen changed the title [UR] Add dynamic linking and program flags [SYCL][UR] Add dynamic linking and program flags Oct 3, 2025
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.

3 participants