Skip to content

Changes the API for DPCTLUSM_GetPointerType. - #1061

Merged
diptorupd merged 1 commit into
masterfrom
fix/DPCTLUSM_GetPointerType
Feb 5, 2023
Merged

diptorupd merged 1 commit into
masterfrom
fix/DPCTLUSM_GetPointerType

Conversation

@diptorupd

Copy link
Copy Markdown
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

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

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

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

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

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

Coverage Status

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

@github-actions

github-actions Bot commented Feb 4, 2023

Copy link
Copy Markdown

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

github-actions Bot commented Feb 5, 2023

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Feb 5, 2023

Copy link
Copy Markdown

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