Skip to content

Commit 9857041

Browse files
authored
Possible fix for CI failures (#617)
1 parent f8cfb5a commit 9857041

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_autotuner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def test_random_search(self):
131131
torch.randn([512, 512], device=DEVICE),
132132
)
133133
bound_kernel = examples_matmul.bind(args)
134-
best = RandomSearch(bound_kernel, args, 10).autotune()
134+
random.seed(123)
135+
best = RandomSearch(bound_kernel, args, 20).autotune()
135136
fn = bound_kernel.compile_config(best)
136137
torch.testing.assert_close(fn(*args), args[0] @ args[1], rtol=1e-2, atol=1e-1)
137138

@@ -142,6 +143,7 @@ def test_differential_evolution_search(self):
142143
torch.randn([512, 512], device=DEVICE),
143144
)
144145
bound_kernel = examples_matmul.bind(args)
146+
random.seed(123)
145147
best = DifferentialEvolutionSearch(
146148
bound_kernel, args, 5, num_generations=3
147149
).autotune()

0 commit comments

Comments
 (0)