diff --git a/benchmarks/common/h2d_test.py b/benchmarks/common/h2d_test.py index 227aa8106..6e5eb509b 100644 --- a/benchmarks/common/h2d_test.py +++ b/benchmarks/common/h2d_test.py @@ -31,7 +31,7 @@ def from_njt(cls, njt_tensor): _offsets=njt_tensor._offsets, _lengths=njt_tensor._lengths, njt_shape=njt_tensor.size(0), - ) + ).clone() @pytest.fixture(autouse=True, scope="function") @@ -148,6 +148,7 @@ def consolidate(td, num_threads): @pytest.mark.skipif( TORCH_VERSION < version.parse("2.5.1"), reason="requires torch>=2.5" ) +@pytest.mark.skipif(not torch.cuda.is_available(), reason="no CUDA device found") class TestTo: def test_to( self, benchmark, consolidated, td, default_device, compile_mode, num_threads