Skip to content

Commit 6af5d72

Browse files
committed
remove cuda tensors
1 parent 3ddc8bc commit 6af5d72

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_autotune_add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def test_autotune_add_inrange():
5050
This test uses n_elements = 128, matching the size of the input tensors.
5151
It should NOT cause any out-of-bound access.
5252
"""
53-
x = torch.randn(128, device="cuda")
54-
y = torch.randn(128, device="cuda")
53+
x = torch.randn(128)
54+
y = torch.randn(128)
5555
out = torch.empty_like(x)
5656

5757
# The kernel launch uses n_elements=128, aligned with the tensor size.
@@ -66,8 +66,8 @@ def test_autotune_add_out_of_bound():
6666
This test deliberately sets n_elements = 256, exceeding the actual buffer size (128).
6767
It will likely cause out-of-bound reads/writes, which may trigger errors or warnings.
6868
"""
69-
x = torch.randn(128, device="cuda")
70-
y = torch.randn(128, device="cuda")
69+
x = torch.randn(128)
70+
y = torch.randn(128)
7171
out = torch.empty_like(x)
7272

7373
# The kernel launch uses n_elements=256, exceeding the valid tensor size.

0 commit comments

Comments
 (0)