diff --git a/sklbench/utils/special_params.py b/sklbench/utils/special_params.py index 80812012..c3af67da 100644 --- a/sklbench/utils/special_params.py +++ b/sklbench/utils/special_params.py @@ -175,6 +175,14 @@ def assign_case_special_values_on_run( "Skipping setting of 'target_offload' for CPU device " "to avoid extra overheads" ) + elif hasattr(data[0], "__sycl_usm_array_interface__"): + # Use the data's queue so fitted attributes share it with later inputs + logger.debug( + "Setting 'target_offload' to 'auto' for data already on a SYCL device" + ) + set_bench_case_value( + bench_case, "algorithm:sklearnex_context:target_offload", "auto" + ) else: set_bench_case_value( bench_case, "algorithm:sklearnex_context:target_offload", device