-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Keep multiple copies for bf16 device library image #17461
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
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4ee0932
Skip unnecessary init for bf16 devicelib image
jinge90 57b5523
skip bf16 devicelib image when merging metadata
jinge90 57d14fd
Merge remote-tracking branch 'upstream/sycl' into bf16_conversion_dlc…
jinge90 26f8895
Merge remote-tracking branch 'upstream/sycl' into bf16_conversion_dlc…
jinge90 34f396f
Use Refcount to guard bf16 devicelib
jinge90 b09663d
Merge remote-tracking branch 'upstream/sycl' into bf16_conversion_dlc…
jinge90 fcbbe1c
allow multiple device image for bf16 devicelib symbols
jinge90 c794cb3
fix comment
jinge90 db0281d
remove restriction
jinge90 aa60bc5
Make bfloat16 devicelib image PM managed
jinge90 1351401
Create DynRTDeviceBinaryImage for bf16 devicelib
jinge90 640f679
fix clang format
jinge90 24fa45a
Fix sycl.cpp and use std::array to replace map for bf16 device images
jinge90 472d1be
change default libversion to 2
jinge90 a33f24d
Merge remote-tracking branch 'upstream/sycl' into bf16_conversion_dlc…
jinge90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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 isn't sufficient to keep the image alive. The
RTDeviceBinaryImage
does not own thesycl_device_binary_struct
, which itself does not own the raw binary data (e.g. SPIRV) atsycl_device_binary_struct::BinaryStart
; both entities become unavailable afterProgramManager::removeImages
(either throughdlclose
or explicit deleting from a context object in thesycl-jit
library). One way to trigger a crash is to executetest_device_libraries
twice insycl/test-e2e/KernelCompiler/sycl.cpp
.I think a solution could be to create a
DynRTDeviceBinaryImage
with a copy of the data coming from a bfloat device library image. (NB:DynRTDeviceBinaryImage
doesn't set compile/link options, is that a problem?)Uh oh!
There was an error while loading. Please reload this page.
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.
Hi, @jopperm
Thanks very much to point out this. I updated the PR to let program manager to own devicelib DynRTDeviceBinaryImage. It seems compile/link options are not problems but we can't set PropertySet value for DynRTDeviceBinaryImage, so can't check BFloat16DevicelibMetadata. I have to use a workaround to compare the DeviceImagePtr. I also updated the KernelCompiler/sycl.cpp to run test_device_library 2 times. The PM owned DynRTDeviceBinaryImage won't be removed unless PM is destroyed.
Thanks very much.