Skip to content

Make _array_api_for_tests accept a dtype_name and raise SkipTest if the requested dtype/device is not supported #33907

Closed

Description

@ogrisel

As discussed in #32460, the supported dtype can sometimes vary even if the device name is the same, and we need to do runtime inspection for instance using __array_namespace_info__.dtypes. It means that we would need to update all the array API test to pass both device and dtype_name to _array_api_for_tests to do this check and raise SkipTest when appropriate instead of running a test that will fail with a low level error message.

This is the case for PyTorch with the XPU device on different kinds of hardware: some Intel GPUs reachable via this device do support the xp.float64 dtype while others don't.

I think @cakedev0 has access to such hardware on his laptop.

Activity

  1. added
    module:test-suite
    on Apr 30, 2026
  2. added theissue type on Apr 30, 2026
  3. moved this to Todo in Array APIon Apr 30, 2026
  4. cakedev0 commented on Apr 30, 2026

    @cakedev0
    Member

    This is the case for PyTorch with the XPU device on different kinds of hardware: some Intel GPUs reachable via this device do support the xp.float64 dtype while others don't.

    It's for dpnp on GPU that this case can happen. I'm not sure for PyTorch XPU, because their hardware prerequisite might only allow GPUs with float64 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Array APImodule:test-suite

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions