Repository navigation
Sync third-party tests - #3201
Draft
antonwolfy wants to merge 6 commits into
Draft
antonwolfy wants to merge 6 commits into
antonwolfy wants to merge 6 commits into
Conversation
CuPy now handles a Python integer that int64 cannot hold as NumPy does: combined with a boolean array it raises `OverflowError` instead of being taken as `uint64`. This mirrors its test changes: - `test_binary_array_pyscalar_int_and_bool` compares with NumPy for both operand orders, accepting `OverflowError`. dpnp already matches NumPy there, so the test is no longer skipped. - `TestUfunc::test_add_large_python_int_cache` is new. It adds two Python integers, which dpnp does not support, so it is skipped.
Contributor
|
Array API standard conformance tests for dpnp=0.22.0dev3=np2py314h8d9cdd5_62 ran successfully. |
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3201/index.html |
Collaborator
CuPy fixed `ndarray.min` and `ptp` passing `out` and `dtype` in swapped order to its CUB reduction, and added tests that `max`, `min` and `ptp` with `out=` return `out` itself for each axis. dpnp has no such accelerator path and passes them unchanged, so they are mirrored without skips.
CuPy now hashes its `xsf` headers into a separate cache key, used only by kernels that include them, and drops the HIP extra-source workaround from its compile helpers. This mirrors its test changes in modules dpnp skips as a whole, so no test runs differently: - `test_function.py`: `_compile_func` calls `_compile_module_with_cache` without `extra_source`. - `test_raw.py`: `test_dynamical_parallelism` and `test_jitify5` take the `allow_full_header_cache` fixture and a `thread_unsafe` mark. - `test_compiler_cache.py`: new `test_hash_hexdigest_chunks` for `_hash_hexdigest` with several chunks.
CuPy now deprecates creating `cupy.cuda.cufft.Plan1d` and `PlanNd` directly, and its multi-GPU FFT (`cupy.fft.config.use_multi_gpus` and `set_cufft_gpus`). This mirrors its test changes, all in tests dpnp skips, so no test runs differently: - `test_fft.py`: `multi_gpu_config` and `test_plan_nd_init_api` ignore the new deprecation warnings, and the new `test_multi_gpu_config_deprecated` is skipped since multi GPU is not supported. - `test_cache.py`: `test_LRU_cache7` ignores the multi-GPU deprecation warning. The other changed file, `cuda_tests/test_cufft.py`, has no dpnp copy.
5 of 7 tasks
CuPy fixed the memory size of a tensor imported from DLPack, which added up the shape extents instead of multiplying them, and added a test for it. This mirrors the test in `core_tests/test_dlpack.py`. The new `TestDLTensorMemory::test_memory_size` checks `out.data.size`, since dpnp's `data` is the USM memory itself, against `max(nbytes, itemsize)`, since dpnp allocates at least one element for an empty array. dpnp multiplies the extents, but its empty case `(0, 3)` fails until #3203 is merged, because the import sized an empty tensor by its nonzero dimensions.
…and isfortran CuPy now gives the warnings NumPy 2.6 adds: a `DeprecationWarning` for `dot` with `a.ndim >= 2` and `b.ndim > 2` and for `isfortran`, and a `FutureWarning` for `append` with a Python scalar. It also accepts 0-D input in `poly` and `roots`, as NumPy 2.6 does. dpnp already gives all three warnings, so this mirrors CuPy's test changes: - `test_product.py`: `TestDot` and `test_transposed_dot_with_out_f_contiguous` ignore the `dot` warning, and `test_transposed_dot` and `test_transposed_dot_with_out` now check it, for NumPy >= 2.6 too. CuPy's filters replace dpnp's own `_ignore_dot_nd_deprecation` mark. - `test_type_test.py`: `TestIsFortran` checks the `dpnp.isfortran` warning and compares with `flags.fnc` of the NumPy input. - `test_add_remove.py`: `TestAppend` becomes a plain class, its Python scalar tests take CuPy's warning filter, and the new `test_scalar_futurewarning` is skipped since it also passes the scalar as `arr`, which dpnp does not support. dpnp's own `TestAppend` covers the warning for an array `arr`. - `test_polynomial.py`, which dpnp skips: `test_poly_zero_dim` and `test_roots_zero_dim` compare with NumPy instead of expecting a `TypeError`. The other changed file, the sparse `test_linalg.py`, only marks a LOBPCG test that dpnp's copy does not have.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR mirrors six sets of CuPy test changes. Only test files are changed.