File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ def test_autotune_add_inrange():
50
50
This test uses n_elements = 128, matching the size of the input tensors.
51
51
It should NOT cause any out-of-bound access.
52
52
"""
53
- x = torch .randn (128 , device = "cuda" )
54
- y = torch .randn (128 , device = "cuda" )
53
+ x = torch .randn (128 )
54
+ y = torch .randn (128 )
55
55
out = torch .empty_like (x )
56
56
57
57
# The kernel launch uses n_elements=128, aligned with the tensor size.
@@ -66,8 +66,8 @@ def test_autotune_add_out_of_bound():
66
66
This test deliberately sets n_elements = 256, exceeding the actual buffer size (128).
67
67
It will likely cause out-of-bound reads/writes, which may trigger errors or warnings.
68
68
"""
69
- x = torch .randn (128 , device = "cuda" )
70
- y = torch .randn (128 , device = "cuda" )
69
+ x = torch .randn (128 )
70
+ y = torch .randn (128 )
71
71
out = torch .empty_like (x )
72
72
73
73
# The kernel launch uses n_elements=256, exceeding the valid tensor size.
You can’t perform that action at this time.
0 commit comments