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

Use partition_type_property descriptor in DPCTLDevice_GetParentDevice #1452

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Use partition_type_property descriptor in DPCTLDevice_GetParentDevice.

This allows to test that the device is an unpartitioned device without raising and handling the C++ exception.

If info::device::partition_type_property is info::partition_property::no_partition then retrieving
the parent_device descriptor will throw.

This change reduces the clutter of expected [ERR] messages in DPCTL_VERBOSITY=error mode.

  • Have you provided a meaningful PR description?
  • 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?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_44 ran successfully.
Passed: 935
Failed: 65
Skipped: 119

This allows to test that the device is an unpartition device without
raising and handling the C++ exception.

If info::device::partition_type_property is
info::partition_property::no_partition then retrieving the parent_device
descriptor will throw.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the improve-exception-parent-device branch from 006843e to 4ac53fd Compare October 23, 2023 09:35
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 85.655% (-0.05%) from 85.701% when pulling 4ac53fd on improve-exception-parent-device into b437c47 on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_46 ran successfully.
Passed: 934
Failed: 66
Skipped: 119

@oleksandr-pavlyk oleksandr-pavlyk merged commit 386bd8b into master Oct 24, 2023
26 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the improve-exception-parent-device branch October 24, 2023 00:17
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