-
Notifications
You must be signed in to change notification settings - Fork 755
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
[SYCL] Extend image cleanup for __sycl_unregister_lib #17091
base: sycl
Are you sure you want to change the base?
Conversation
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
…ion that is not the case for removeImage usage and to be removed Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
@jopperm hi, we overlapped in code a bit, I was fixing bugs of dynamic images load/unload. I removed duplications and added some extra details. I saw that you didn't cleaned up containers that you can't test with E2E test now - I added unit test where I can check them. |
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
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.
Thanks for taking care of this and adding the comprehensive test.
@@ -3594,6 +3629,8 @@ extern "C" void __sycl_register_lib(sycl_device_binaries desc) { | |||
|
|||
// Executed as a part of current module's (.exe, .dll) static initialization | |||
extern "C" void __sycl_unregister_lib(sycl_device_binaries desc) { | |||
(void)desc; | |||
// TODO implement the function | |||
// No need in fair partial cleanup at shutdown |
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.
// No need in fair partial cleanup at shutdown | |
// Partial cleanup is not necessary at shutdown |
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.
done in 42a642f
assert(It != m_KernelName2KernelIDs.end()); | ||
m_KernelName2KernelIDs.erase(It); | ||
m_KernelIDs2BinImage.erase(It->second); | ||
// remove Everything associated with this KernelName |
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.
// remove Everything associated with this KernelName | |
// remove everything associated with this KernelName |
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.
done in 42a642f
std::ignore = m_KernelUsesAssert.erase(EntriesIt->name); | ||
std::ignore = m_KernelImplicitLocalArgPos.erase(EntriesIt->name); |
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.
Do we need to std::ignore
the return values? There are plenty of other erase
calls where we don't.
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.
To be honest I do not know if our code analyzer reacts on unhandled return value in this case. I removed them. It is not a big deal to add them later if needed.
42a642f
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
@uditagarwal97 FYI I don't add extra test for kernel cache update since I reused kernel eviction related code a lot. I rely on unit tests for kernel eviction and E2E test that failed because of absence of cache cleanup in dynamic image loading case - ./sycl/test-e2e/syclcompat/kernel/kernel_lin.cpp. |
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
fixes #16031