Skip to content
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

Release any queues left when atexit is called. #147

Merged

Conversation

coldav
Copy link
Collaborator

@coldav coldav commented Oct 2, 2023

Overview

Release any queues left when atexit is called.

Reason for change

This is due to an issue with dpc++ where it can leave temporary queues unreleased. This can then have the effect on the closing down of the device.

Description of change

This is resolved by registering and deregistering the queues on creation and deletion and then releasing any queues which still have an external reference when atexit is called.

This should be reviewed when intel/llvm#11156 is fixed.

@coldav coldav force-pushed the colin/workaround_queue_closedown_issue branch from 375330d to 4b6a5a5 Compare October 2, 2023 15:17
source/cl/source/device.cpp Outdated Show resolved Hide resolved
@coldav coldav force-pushed the colin/workaround_queue_closedown_issue branch 2 times, most recently from 2ca5f98 to 2a81a4c Compare October 5, 2023 14:38
This is due to an issue with dpc++ where it can leave temporary queues
unreleased. This can then have the effect on the closing down of the
device.

This is resolved by registering and deregistering the queues on creation
and deletion and then releasing any queues which still have an external
reference when `atexit` is called. This required an additional device
mutex to avoid threading issues.

This should be reviewed when intel/llvm#11156
is fixed.
@coldav coldav force-pushed the colin/workaround_queue_closedown_issue branch from 2a81a4c to 720cab7 Compare October 9, 2023 08:19
@coldav coldav merged commit e1841a5 into uxlfoundation:main Oct 9, 2023
3 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.

2 participants