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

Changes to the DpctlSyclQueue and USMNdArray types. #1064

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

diptorupd
Copy link
Contributor

  • Have you provided a meaningful PR description?

Storing the Python dpctl.SyclQueue inside any instance of the DpctlSyclQueue type was causing segfaults due to the Python object getting garbage collected prematurely.

The changes in the PR update the DpctlSyclQueue type to only store the filter string associated with the dpctl.SyclQueue and not the actual Python object. In addition, the USMNdArray type now stores an instance of a DpctlSyclQueue in its queue parameter instead of a Python dpctl.SyclQueue object.

Due to these changes, all places where the Python dpctl.SyclQueue was getting extracted and used from a UsmNdArray instance or DpctlSyclQueue instance have been updated.

All test cases were also updated.

  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

Diptorup Deb added 3 commits June 6, 2023 11:32
   - Storing the Python dpctl.SyclQueue inside any instance of
     the DpctlSyclQueue type was causing segfaults due to
     the Python object getting garbage collected prematurely.

     The changes in the PR update the DpctlSyclQueue type to
     only store the filter string associated with the
     dpctl.SyclQueue and not the actual Python object. In addition,
     the USMNdArray type now stores an instance of a
     DpctlSyclQueue in its queue parameter instead of a Python
     dpctl.SyclQueue object.

     Due to these changes, all places where the Python
     dpctl.SyclQueue was getting extracted and used from a
     UsmNdArray instance or DpctlSyclQueue instance have been
     updated.

     All test cases were also updated.
@diptorupd diptorupd requested a review from chudur-budur as a code owner June 9, 2023 01:23
@diptorupd diptorupd changed the base branch from fix/teamcity_ci to main June 9, 2023 05:25
@diptorupd diptorupd changed the title Changed the DpctlSyclQueue and USMNdArray types. Changes to the DpctlSyclQueue and USMNdArray types. Jun 9, 2023
@diptorupd diptorupd merged commit 145f980 into main Jun 9, 2023
@diptorupd diptorupd deleted the change/DpctlSyclQueue_type branch June 9, 2023 05:27
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.

1 participant