      input_scale=1.0,
      scale=1 / 8.0,
      n_ctx=256,
-@@ -100,7 +101,7 @@ def test_attention_fwd_bwd(
+@@ -95,12 +96,12 @@ def test_attention_fwd_bwd(
+     # inputs
+     qkv_shape = (batch_size, n_heads, n_ctx, 64)
+     qkvs = [
+-        torch.nn.Parameter(input_scale * torch.randn(qkv_shape), requires_grad=True).to(dtype).cuda() for _ in range(3)
++        torch.nn.Parameter(input_scale * torch.randn(qkv_shape), requires_grad=True).to(dtype, device=device) for _ in range(3)
+     ]
      attn_mask = torch.tril(
          torch.ones(
              [n_ctx, n_ctx],

             dtype=dtype,
         ),
         diagonal=0,
diff --git a/python/test/unit/operators/test_cross_entropy.py b/python/test/unit/operators/test_cross_entropy.py
index 48cb303b..8a683319 100644
--- a/python/test/unit/operators/test_cross_entropy.py

 python/test/regression/test_performance.py    | 10 ++--
 python/test/unit/language/test_core.py        | 47 +++++++++----------
 python/test/unit/language/test_random.py      |  6 +--
 .../test/unit/operators/test_blocksparse.py   | 21 +++++----
 .../test/unit/operators/test_cross_entropy.py |  6 +--
 python/test/unit/operators/test_matmul.py     |  6 +--
 7 files changed, 63 insertions(+), 48 deletions(-)
 create mode 100644 python/test/conftest.py

diff --git a/python/test/conftest.py b/python/test/conftest.py
