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 the API for DPCTLUSM_GetPointerType. #1061

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

diptorupd
Copy link
Contributor

  • Have you provided a meaningful PR description?

    • DPCTLUSM_GetPointerType used to return a global string literal
      and had an API that is different from all other libsyclinterface
      functions that return a C string.

      Returning a pointer to a global literal as opposed to a heap
      allocated memory meant the ownership of the pointer was not
      clear when crossing language boundary.

      Calling DPCTLCString_Delete on the previously returned const char*
      will cause a segfault

    • The PR introduces an enum for usm types and returns an enum value
      from DPCTLUSM_GetPointerType.

    • All Python API is unaffected.

  • Have you added a test, reproducer or referred to an issue with a reproducer?

Existing unit tests have been updated.

  • Have you tested your changes locally for CPU and GPU devices?

No

  • Have you made sure that new changes do not introduce compiler warnings?

Yes

  • If this PR is a work in progress, are you filing the PR as a draft?

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_77 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @diptorupd

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_77 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@diptorupd diptorupd force-pushed the fix/DPCTLUSM_GetPointerType branch from 50196bc to 065e28e Compare February 4, 2023 18:09
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_77 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_78 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

    - DPCTLUSM_GetPointerType used to return a global string literal
      and had an API that is different from all other libsyclinterface
      functions that return a C string.

      Returning a pointer to a global literal as opposed to a heap
      allocated memory meant the ownership of the pointer was not
      clear when crossing language boundary.

      Calling DPCTLCString_Delete on the previously returned const char*
      will cause a segfault

    - The PR introduces an enum for usm types and returns an enum value
      from DPCTLUSM_GetPointerType.

    - All Python API is unaffected.
@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 82.208% (-0.02%) from 82.224% when pulling e75f13b on fix/DPCTLUSM_GetPointerType into d77f570 on master.

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_77 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@diptorupd diptorupd merged commit 7c15231 into master Feb 5, 2023
@diptorupd diptorupd deleted the fix/DPCTLUSM_GetPointerType branch February 5, 2023 01:57
@github-actions
Copy link

github-actions bot commented Feb 5, 2023

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

github-actions bot commented Feb 5, 2023

Array API standard conformance tests for dpctl=0.14.1dev1=py310h76be34b_77 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

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