-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add umfInit/umfTearDown to urAdapterGet/urAdapterRelease #2007
Add umfInit/umfTearDown to urAdapterGet/urAdapterRelease #2007
Conversation
c2fd168
to
9e92cf8
Compare
// This is a temporary workaround on windows, where UR adapter is teardowned | ||
// before the UR loader, which will result in access violation when we use print | ||
// function as the overrided print function was already released with the UR | ||
// adapter. | ||
// TODO: Change adapters to use a common sink class in the loader instead of | ||
// using thier own sink class that inherit from logger::Sink. |
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.
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.
Yeah, I think that's fine for now. Eventually, we could do a similar thing like here: #2000. Just keep a global instance of shared_ptr<> to the logger (here
static Logger logger = |
9e92cf8
to
581a0d8
Compare
…TearDown-to-urAdapterGet/urAdapterRelease Add umfInit/umfTearDown to urAdapterGet/urAdapterRelease
As windows order of unloading dlls is reversed from linux, windows will call umfTearDown before it could release umf objects in level_zero, so we call umfInit on urAdapterGet and umfAdapterTearDown to enforce the teardown of umf
after umf objects are destructed.
Intel/llvm PR