Skip to content

benchmarks: cupy branch in get_xr_dataarray never raises NotImplementedError on non-GPU hosts #3707

Description

@brendancol

benchmarks/benchmarks/common.py gates the cupy branch with if not has_cuda_and_cupy: — but has_cuda_and_cupy is a function, so the expression is always false and the guard never fires. On a host without CUDA the branch falls through to import cupy and the benchmark dies with ImportError instead of being skipped via NotImplementedError.

The dask+cupy branch added in #3706 calls the function correctly; this fixes the older branch to match. One-line change plus whatever guard-behavior check is practical without a GPU-less CI lane.

Spotted during the #3706 review; kept out of that PR to leave the diff scoped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions