[SYCL][SYCLBIN] Fix native-AOT object-state cross-library link#22509
Open
koparasy wants to merge 1 commit into
Open
[SYCL][SYCLBIN] Fix native-AOT object-state cross-library link#22509koparasy wants to merge 1 commit into
koparasy wants to merge 1 commit into
Conversation
b567a8d to
ba19a56
Compare
Contributor
Author
|
@KseniyaTikhomirova gentle ping about this one. Thank you! |
Contributor
|
@0x12CC hi, can you please help with review as SYCLBIN owner? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix native-AOT object-state cross-library link
Loading an AOT-only object-state SYCLBIN and linking it via
sycl::linkdid not work end to end. #22196 enabled the importer-side object load
(and shipped a load-only e2e), but a full cross-library link of native
AOT objects hit three defects, none covered by that load-only test.
Bugs fixed
Export-only AOT library not loadable as
object.SYCLBINBinaries::getBestCompatibleImagesgated the native-imagefallback on
getBinImageState(img) == State. An export-only libraryimports nothing, so it classifies as
executableand was dropped foran
objectrequest .Assertion on loaded image state. The SYCLBIN loader stamped the
image with its intrinsic state (
executable), trippingDevImageState == bundle_state::objectinbringSYCLDeviceImageToState. The created image is now clamped to therequested (already-validated) declared state.
Segfault on AOT-only link.
kernel_bundle_impl::linkalwaysinvoked
ProgramManager::linkon the JIT image set; for an AOT-onlylink that set is empty, so
urProgramLinkExpwas called with zeroprograms and segfaulted in the L0 adapter. The JIT link is now skipped
when there are no JIT images; AOT images are resolved via
dynamicLink.Tests
SYCLBIN/link_object_aot.cpp— cross-library link of twoAOT-only object SYCLBINs on Level Zero (spir64_gen). Exercises the AOT
partition,
ProgramManager::buildwithAllowUnresolvedSymbols, anddynamicLink. Restricted to L0 (REQUIRES: level_zero, ocloc);AOTBinaryTarget.cpp—isAOTBinaryTargetandgetBinImageStateclassifiers.DynamicLinking.cpp—buildwithAllowUnresolvedSymbols(happy path + program-cache-key bool), and
feature_not_supportedguards on the build and link entry points when the adapter lacks the
Exp variants.
RuntimeLinkingCommon::clear()to reset theCreateWithBinary counter (latent; exposed under
--gtest_shuffle).