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

Update dpnp tests to run on Iris Xe #1294

Conversation

vlad-perevezentsev
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev commented Feb 13, 2023

This PR solves the issue #1293

This PR adds a new skip_or_change_if_dtype_not_supported function to helper.py and fixes some tests to run them on Iris Xe which does not support double precision floating point type.
The new function is needed to change an unsupported type to a supported type and skip text if necessary.
Also this PR uses black 22.6.0 for tests.

Needed to create new PRs and fix the code of function directly for the rest of the tests.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@vlad-perevezentsev vlad-perevezentsev self-assigned this Feb 13, 2023
@vlad-perevezentsev vlad-perevezentsev linked an issue Feb 13, 2023 that may be closed by this pull request
@vlad-perevezentsev
Copy link
Collaborator Author

@oleksandr-pavlyk @antonwolfy what do you think about this solution?

@oleksandr-pavlyk oleksandr-pavlyk changed the title Update dpnp tests to run on IRIS Xe Update dpnp tests to run on Iris Xe Feb 13, 2023
@oleksandr-pavlyk
Copy link
Contributor

Test should check for the aspect of the device where the array has been allocated, not of the default-selected device.

def test_abs_int(type):
a = numpy.array([1, 0, 2, -3, -1, 2, 21, -9])
@pytest.mark.parametrize(
"dtype", get_all_dtypes(no_bool=True, no_none=True, no_complex=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it might be helpful to check with default dtype also.

Suggested change
"dtype", get_all_dtypes(no_bool=True, no_none=True, no_complex=True)
"dtype", get_all_dtypes(no_bool=True, no_complex=True)

@pytest.mark.parametrize("type",
[numpy.int64],
ids=['int64'])
@pytest.mark.parametrize("type", [numpy.int64], ids=["int64"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks type is never used in the test

@vlad-perevezentsev vlad-perevezentsev force-pushed the support_dpnp_tests_on_iris branch from 83deb0d to d72d400 Compare February 28, 2023 09:44
@antonwolfy
Copy link
Contributor

@vlad-perevezentsev, do we need still the PR or it can be rejected?

@vlad-perevezentsev
Copy link
Collaborator Author

I will close this PR cause all tests here have been updated with #1472 and other PRs.
At the moment we have no problems with running these tests on Iris Xe.

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.

Update all dpnp tests to run on IRIS Xe
3 participants