Skip to content

Skip non-conformant array API DLPack and flaky tanh conformity tests - #3034

Open
antonwolfy wants to merge 3 commits into
masterfrom
skip/array-api-dunder-dlpack
Open

Skip non-conformant array API DLPack and flaky tanh conformity tests#3034
antonwolfy wants to merge 3 commits into
masterfrom
skip/array-api-dunder-dlpack

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR adds two entries to the array API conformity skips file, each tracked by an upstream issue.

  • 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?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

test_dunder_dlpack pins the requested dl_device to kDLCPU while independently
drawing copy from {True, False, None}. A dpnp array always reports its DLPack
device as kDLOneAPI (never kDLCPU), even when the backing SYCL device is a CPU,
so the copy=False case forces a cross-device export. The array API standard
requires that such a no-copy cross-device transfer be rejected with a
BufferError, which dpnp/dpctl correctly raises. The test wraps the call in a
bare except and treats any exception as a failure, so it fails on
spec-compliant behavior. Skip it, matching how other device-backed libraries
(e.g. CuPy) handle the same test.
@antonwolfy antonwolfy self-assigned this Aug 19, 2026
@antonwolfy antonwolfy added this to the 0.21.0 release milestone Aug 19, 2026
Reference the tracking issues in the skips file and add
test_unary[tanh(...) -> 1 + 0j], which intermittently fails because the
sign of the imaginary zero in the result is unstable (out=(1-0j) vs the
expected 1 + 0j).
@antonwolfy antonwolfy changed the title Skip array API test_dunder_dlpack conformity test Skip non-conformant array API DLPack and flaky tanh conformity tests Aug 19, 2026
@ndgrigorian

Copy link
Copy Markdown
Collaborator

@antonwolfy what is the cause of non-conformance of the DLPack tests? Has it been investigated?

@antonwolfy

antonwolfy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@antonwolfy what is the cause of non-conformance of the DLPack tests? Has it been investigated?

I placed links per each associated skipped test

Comment thread .github/workflows/array-api-skips.txt Outdated
Co-authored-by: ndgrigorian <46709016+ndgrigorian@users.noreply.github.com>
@antonwolfy
antonwolfy marked this pull request as ready for review August 19, 2026 21:03
@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev5=py314ha0e2e8e_6 ran successfully.
Passed: 1375
Failed: 0
Skipped: 7

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.458%. remained the same — skip/array-api-dunder-dlpack into master

@github-actions

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/3034/index.html

@vlad-perevezentsev vlad-perevezentsev 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
Thank you @antonwolfy

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.

4 participants