Skip to content

Add integer dtypes (int8, int16, uint8-uint64) to dpnp interface #2230

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 20 commits into from
Feb 14, 2025

Conversation

AlexanderKalistratov
Copy link
Collaborator

@AlexanderKalistratov AlexanderKalistratov commented Dec 11, 2024

Add missing aliases to integer types: [u]byte, ushort, [u]longlong Not adding [u]long aliases as it is removed from NumPy (https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations) Removed int alias as it is depricate in NumPy
Extend tests types matrix by these types
Add environment variable DPNP_TEST_ALL_INT_TYPES to enable/disable these types in 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?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

Add missing aliases to integer types: [u]byte, ushort, [u]longlong
Not adding [u]long aliases as it is removed from NumPy (https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations)
Removed int alias as it is depricate in NumPy
Extend tests types matrix by these types
Add environment variable DPNP_TEST_ALL_TYPES to enable/disable these types in tests
Failing dpnp tests:

test_arraycreation.py::test_geomspace
test_arraycreation.py::test_linspace
test_arraycreation.py::test_logspace
test_fft.py::TestFft2::test_fft2
test_fft.py::TestRfft2::test_rfft2
test_histogram.py::TestDigitize::test_digitize
test_indexing.py::TestPut::test_input_1d
test_indexing.py::TestPut::test_input_2d
test_indexing.py::TestPutAlongAxis::test_replace_max
test_indexing.py::TestTake::test_1d
test_indexing.py::TestTake::test_2d
test_indexing.py::TestTakeAlongAxis::test_broadcast
test_indexing.py::TestTakeAlongAxis::test_empty
test_indexing.py::TestTakeAlongAxis::test_empty
test_indexing.py::TestTakeAlongAxis::test_multi_dimensions
test_linalg.py::TestCond::test_cond
test_linalg.py::TestEigenvalue::test_eigenvalues
test_linalg.py::TestLstsq::test_lstsq_diff_type
test_linalg.py::TestNorm::test_norm_1D
test_linalg.py::TestNorm::test_norm_2D
test_linalg.py::TestNorm::test_norm_ND
test_linalg.py::TestNorm::test_norm_usm_ndarray
test_linalg.py::TestPinv::test_pinv
test_linalg.py::TestQr::test_qr
test_linalg.py::TestSvd::test_svd
test_manipulation.py::TestUnique::test_2d_axis_signed_inetger
test_manipulation.py::test_copyto_dtype
test_mathematical.py::TestAngle::test_angle
test_mathematical.py::TestCumLogSumExp::test_basic
test_mathematical.py::TestCumProd::test_out_dtype
test_mathematical.py::TestCumSum::test_out_dtype
test_mathematical.py::TestFix::test_basic
test_mathematical.py::TestFix::test_out
test_mathematical.py::TestHypot::test_hypot
test_mathematical.py::TestLogSumExp::test_logsumexp
test_mathematical.py::TestLogSumExp::test_logsumexp_dtype
test_mathematical.py::TestLogSumExp::test_logsumexp_out
test_mathematical.py::TestLogSumExp::test_logsumexp_out_dtype
test_mathematical.py::TestMathematical::test_remainder
test_mathematical.py::TestMatmul::test_matmul_axes_ND_ND
test_mathematical.py::TestMatmul::test_matmul_axes_out
test_mathematical.py::TestMatmul::test_matmul_dtype
test_mathematical.py::TestMatmul::test_matmul_dtype_matrix_inout
test_mathematical.py::TestMatmul::test_matmul_dtype_matrix_inputs
test_mathematical.py::TestMatmul::test_matmul_out1
test_mathematical.py::TestMatmul::test_matmul_out2
test_mathematical.py::TestPower::test_basic
test_mathematical.py::TestProd::test_prod_out_dtype
test_mathematical.py::TestReduceHypot::test_reduce_hypot
test_mathematical.py::TestReduceHypot::test_reduce_hypot_dtype
test_mathematical.py::TestReduceHypot::test_reduce_hypot_out
test_mathematical.py::TestUnwrap::test_discont
test_mathematical.py::TestUnwrap::test_rand_period
test_nanfunctions.py::TestNanProd::test_nanprod_out_dtype
test_product.py::TestDot::test_dot
test_product.py::TestDot::test_dot_ndarray
test_product.py::TestDot::test_dot_out
test_product.py::TestDot::test_dot_out_scalar
test_product.py::TestDot::test_dot_scalar
test_product.py::TestInner::test_inner
test_product.py::TestInner::test_inner_scalar
test_product.py::TestKron::test_kron_scalar
test_product.py::TestMultiDot::test_multi_dot
test_product.py::TestMultiDot::test_multi_dot_all_2d
test_product.py::TestMultiDot::test_multi_dot_out
test_product.py::TestTensordot::test_tensordot
test_product.py::TestTensordot::test_tensordot_axes
test_product.py::TestTensordot::test_tensordot_input_dtype_matrix
test_product.py::TestTensordot::test_tensordot_scalar
test_sort.py::test_partition
test_statistics.py::TestAverage::test_avg
test_statistics.py::TestAverage::test_avg_strided
test_statistics.py::TestStd::test_std_strided
test_statistics.py::TestVar::test_var_strided
test_statistics.py::test_median
test_strides.py::test_cumlogsumexp
test_strides.py::test_logsumexp
test_strides.py::test_reduce_hypot
test_strides.py::test_strides_erf
test_sum.py::test_sum
test_umath.py::TestArctan2::test_arctan2
test_umath.py::TestCbrt::test_cbrt
test_umath.py::TestCopySign::test_copysign
test_umath.py::TestFloatPower::test_negative_base_value_complex_dtype
test_umath.py::TestLogAddExp::test_logaddexp
test_umath.py::TestRsqrt::test_rsqrt
test_umath.py::TestUmath::test_out
@antonwolfy antonwolfy changed the title Add integer dtypes (int8,int16, uint8-uint64) to dpnp interface Add integer dtypes (int8, int16, uint8-uint64) to dpnp interface Dec 11, 2024
vtavana and others added 2 commits January 23, 2025 14:00
#2233)

In this PR, tests are update to pass with newly added integer dtypes
(int8, int16, uint8, uint16, uint32, uint64).
This PR is in continuation of
#2230.
@coveralls
Copy link
Collaborator

coveralls commented Jan 23, 2025

Coverage Status

coverage: 71.63% (+0.001%) from 71.629%
when pulling 6592abc on extended_types_support
into db97d59 on master.

Copy link
Contributor

Array API standard conformance tests for dpnp=0.17.0dev5=py312he4f9c94_7 ran successfully.
Passed: 971
Failed: 0
Skipped: 43

@vtavana vtavana self-assigned this Jan 24, 2025
@vtavana vtavana marked this pull request as ready for review January 24, 2025 16:32
Copy link
Contributor

github-actions bot commented Jan 28, 2025

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

Copy link
Contributor

github-actions bot commented Jan 28, 2025

Array API standard conformance tests for dpnp=0.17.0dev6=py312he4f9c94_30 ran successfully.
Passed: 992
Failed: 0
Skipped: 22

Copy link
Contributor

@antonwolfy antonwolfy 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 @vtavana for that great effort in implementing that. I believe we are ready to merge that now. No more comments from me.

@vtavana vtavana merged commit 426da51 into master Feb 14, 2025
66 of 69 checks passed
@vtavana vtavana deleted the extended_types_support branch February 14, 2025 00:58
github-actions bot added a commit that referenced this pull request Feb 14, 2025
Add missing aliases to integer types: [u]byte, ushort, [u]longlong Not
adding [u]long aliases as it is removed from NumPy
(https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations)
Removed int alias as it is depricate in NumPy
Extend tests types matrix by these types
Add environment variable DPNP_TEST_ALL_INT_TYPES to enable/disable these
types in tests. 426da51
vtavana added a commit that referenced this pull request Feb 20, 2025
After merging #2230, coverage for `dpnp.iface_manipulation.py` was
decreased related to `dpnp.copyto` function. This PR adds new tests to
improve the coverage and updates the logic used in `dpnp.copyto` to pass
the new tests.
github-actions bot added a commit that referenced this pull request Feb 20, 2025
After merging #2230, coverage for `dpnp.iface_manipulation.py` was
decreased related to `dpnp.copyto` function. This PR adds new tests to
improve the coverage and updates the logic used in `dpnp.copyto` to pass
the new tests. e24fa99
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