-
Notifications
You must be signed in to change notification settings - Fork 788
Fix l0 teardown and sycl windows teardown #17869
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
Fix l0 teardown and sycl windows teardown #17869
Conversation
…design/GlobalObjectsInRuntime.md for a full technical description
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
…to fix_L0_loader_teardown_checks
…g the UR_LEVEL_ZERO_LOADER_TAG from Neils original PR
… is the correct choice
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.
The additional documentation on shutdown behavior topic is very useful.
We are seeing this unrelated Jenkins/Precommit failure in other PR. (e.g. #18014 ) . |
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.
Mostly small comments, but overall I think it looks good. Sorry for the delay!
if (!Lock.owns_lock()) { | ||
|
||
if (allowWait) | ||
return false; // Record was not removed, the caller may try again. | ||
else | ||
return true; // skip. | ||
} |
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.
Nit;
if (!Lock.owns_lock()) { | |
if (allowWait) | |
return false; // Record was not removed, the caller may try again. | |
else | |
return true; // skip. | |
} | |
// If we fail to acquire the lock, return false if the record is still there | |
// and the caller can try again. Return true if the record is gone and | |
// the caller should skip. | |
if (!Lock.owns_lock()) | |
return !allowWait; |
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.
Since you have said this is only a "nit" I'd like to keep it as is, as I think it is easier to read and see the logic as it's written now. Returning !allowWait
is definitely an abbreviation, but it doesn't tie into the comment.
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.
Personally, I don't think allowWait
has any clear ties either way. In general, if (X) return false else return true
is a bit of a logics anti-pattern. You can leave it, but as an outside reader, I think they convey the information equally well. You can also reword the comment if you can think of a better way of explaining it.
After intel#17869, Windows will not unload images during the runtime of the program. However, this means that shared libraries that are dynamically loaded and unloaded will leave dangling pointers to their images. If somehow these images get picked up, e.g. if another library is loaded with overlapping symbols, the runtime may try to dereference the dangling device image pointers. This commit reenables Windows unloading with the caveat that once the global handler is dead the runtime assumes that shutdown has begun. Signed-off-by: Larsen, Steffen <[email protected]>
After intel#17869, Windows will not unload images during the runtime of the program. However, this means that shared libraries that are dynamically loaded and unloaded will leave dangling pointers to their images. If somehow these images get picked up, e.g. if another library is loaded with overlapping symbols, the runtime may try to dereference the dangling device image pointers. This commit reenables Windows unloading with the caveat that once the global handler is dead the runtime assumes that shutdown has begun. Signed-off-by: Larsen, Steffen <[email protected]>
No description provided.