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.
benchmarks/benchmarks/common.pygates the cupy branch withif not has_cuda_and_cupy:— buthas_cuda_and_cupyis a function, so the expression is always false and the guard never fires. On a host without CUDA the branch falls through toimport cupyand the benchmark dies with ImportError instead of being skipped via NotImplementedError.The
dask+cupybranch 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.