Skip to content

Fix technical debt in trig element-wise function tests #2126

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

Merged
merged 8 commits into from
Jul 23, 2025

Conversation

ndgrigorian
Copy link
Collaborator

This PR proposes removing a number of trig tests, and rewriting some

Some of these tests are redundant with other tests already present in the test suite, checking the outcome of generic parts of the element-wise function machinery (i.e., testing for identical output usm_type as input). Any arbitrary element-wise function could be used to check this machinery.

Also removes all tests for complex special cases, as

  • NumPy may provide different results conditionally
  • the array API test suite already tracks these special cases
  • cmath cannot be used without creating complicated logic in the test suite

reintroducing or rewriting these tests for a smaller subset of complex special cases, and for each function individually, may be a step to take in a later PR, when further refactoring the test suite

  • 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?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Jul 22, 2025

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

Copy link

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_69 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

@ndgrigorian ndgrigorian force-pushed the refactor-trig-tests branch from 8b4f079 to de8c3ee Compare July 22, 2025 04:57
Copy link

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_69 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

@coveralls
Copy link
Collaborator

coveralls commented Jul 22, 2025

Coverage Status

coverage: 85.888% (-0.005%) from 85.893%
when pulling 636147d on refactor-trig-tests
into 8c94751 on master.

@ndgrigorian ndgrigorian marked this pull request as ready for review July 22, 2025 08:26
Copy link

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_74 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

Copy link

Array API standard conformance tests for dpctl=0.21.0dev0=py310h93fe807_75 ran successfully.
Passed: 1115
Failed: 6
Skipped: 119

Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @ndgrigorian!

@ndgrigorian ndgrigorian merged commit aa05645 into master Jul 23, 2025
35 checks passed
@ndgrigorian ndgrigorian deleted the refactor-trig-tests branch July 23, 2025 02:49
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