Skip to content

[SYCL] Delete symbol based info with the last image referencing it #19659

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 17 commits into from
Aug 13, 2025

Conversation

sergey-semenov
Copy link
Contributor

@sergey-semenov sergey-semenov commented Jul 31, 2025

Prior to this patch, symbol based info (e.g. kernel id, kernel assert usage or images containing an exported symbol) was deleted whenever an image referencing it was removed. This is incorrect since multiple images can contain the same symbol.

While unlikely to cause any problems now (since those images usually all get removed with one call to removeImages after another), this will cause issues once kernel name based kernel caches start getting cleaned up in the same manner.

Prior to this patch, kernel name based info (e.g. kernel id or assert usage)
was deleted whenever an image referencing it was removed. This is technically
incorrect since multiple images can contain the same kernel name.
@sergey-semenov sergey-semenov changed the title [SYCL] Delete kernel name based info with the last image referencing it [SYCL] Delete entry name based info with the last image referencing it Aug 4, 2025
@sergey-semenov sergey-semenov marked this pull request as ready for review August 8, 2025 16:25
@sergey-semenov sergey-semenov requested a review from a team as a code owner August 8, 2025 16:25
Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

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

I don't have hard objections any more.

m_KernelIDs2BinImage.erase(It->second);
m_KernelName2KernelIDs.erase(It);
auto Name2IDIt = m_KernelName2KernelIDs.find(Name);
if (Name2IDIt != m_KernelName2KernelIDs.end())
Copy link
Contributor

Choose a reason for hiding this comment

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

When isn't that true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing comes to mind, pretty sure this should be an assert. I'll make a follow up change for this.

@sergey-semenov sergey-semenov merged commit 4a3fe1e into intel:sycl Aug 13, 2025
28 checks passed
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