TST: skip dlpack tests on numpy 1.2x, dask, and cupy#412
TST: skip dlpack tests on numpy 1.2x, dask, and cupy#412ev-br merged 1 commit intodata-apis:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Array API test expectations by skipping/xfailing DLPack-related tests for specific backends/versions where DLPack interoperability is not supported or not compliant with the test suite.
Changes:
- Mark DLPack test cases as xfail/skip for NumPy 1.22 and 1.26.
- Mark DLPack test cases as xfail/skip for Dask.
- Mark CuPy 14 DLPack tests as xfail/skip due to
copy=keyword argument incompatibility.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| numpy-1-26-xfails.txt | Adds DLPack test xfails for NumPy 1.26 runs. |
| numpy-1-22-xfails.txt | Adds DLPack test xfails for NumPy 1.22 runs. |
| dask-xfails.txt | Adds DLPack test xfails for Dask runs. |
| cupy-xfails.txt | Adds DLPack-related xfails for CuPy 14 compatibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +infinity and isfinite(imag(x_i)) and imag(x_i) > 0) -> 1 + 0j] | ||
|
|
||
|
|
||
| # no dlpack support |
There was a problem hiding this comment.
The note # no dlpack support is misleading in this file: from_dlpack is imported from NumPy (and is already referenced in the earlier # 2023.12 support signature xfails). Consider rewording this comment to describe the actual incompatibility being skipped here (e.g., missing __dlpack__/__dlpack_device__ on ndarray, or from_dlpack signature/behavior not matching the Array API tests), so future maintainers know what to re-check when NumPy gains compliant support.
| # no dlpack support | |
| # DLPack-related Array API tests are still incompatible: ndarray lacks | |
| # __dlpack__/__dlpack_device__, and NumPy's from_dlpack support does not | |
| # yet match these test expectations. |
| # no dlpack support | ||
| array_api_tests/test_dlpack.py::test_dlpack_device | ||
| array_api_tests/test_dlpack.py::test_dunder_dlpack | ||
| array_api_tests/test_dlpack.py::test_from_dlpack |
There was a problem hiding this comment.
This DLPack-related xfail block is far away from the existing # 2023.12 support section that already contains the from_dlpack / __dlpack__ signature xfails. To keep the file organized, please move this block next to the other DLPack entries (or add a dedicated DLPack section) so all related xfails are co-located.
| array_api_tests/test_special_cases.py::test_unary[acosh(real(x_i) is +0 and imag(x_i) is NaN) -> NaN \xb1 \u03c0j/2] | ||
| array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +infinity and isfinite(imag(x_i)) and imag(x_i) > 0) -> 1 + 0j] | ||
|
|
||
| # no dlpack support |
There was a problem hiding this comment.
Same as numpy-1-26-xfails.txt: # no dlpack support is too broad here, since from_dlpack exists in NumPy 1.22+ (and this file already has from_dlpack/__dlpack__ signature xfails). Please reword the comment to capture the specific missing/non-compliant pieces that cause these tests to be skipped.
| # no dlpack support | |
| # NumPy 1.22 has from_dlpack/__dlpack__, but device handling and full DLPack protocol compliance are still missing/non-compliant |
| # cupy 13.x follows numpy 1.x w/o weak promotion: result_type(int32, uint8, 1) != result_type(int32, uint8) | ||
| array_api_tests/test_data_type_functions.py::TestResultType::test_with_scalars | ||
|
|
||
| # CuPy 14 does not support copy= dlpack argument |
There was a problem hiding this comment.
The comment # CuPy 14 does not support copy= dlpack argument is a bit unclear/grammatically off. Please clarify it to explicitly reference the DLPack protocol/__dlpack__ keyword argument (e.g., that CuPy’s __dlpack__/from_dlpack does not accept the copy= keyword expected by the Array API tests).
| # CuPy 14 does not support copy= dlpack argument | |
| # CuPy 14's DLPack support (__dlpack__/from_dlpack) does not accept | |
| # the copy= keyword argument expected by the Array API tests. |
No description provided.