Skip to content

Commit 06ebee1

Browse files
committed
Fix the seed on DeformConv autocast test.
1 parent a17b3e5 commit 06ebee1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from common_utils import set_rng_seed
12
import math
23
import unittest
34

@@ -655,6 +656,7 @@ def script_func_no_mask(x_, offset_, weight_, bias_, stride_, pad_, dilation_):
655656

656657
@unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable")
657658
def test_autocast(self):
659+
set_rng_seed(0)
658660
for dtype in (torch.float, torch.half):
659661
with torch.cuda.amp.autocast():
660662
self._test_forward(torch.device("cuda"), False, dtype=dtype)

0 commit comments

Comments
 (0)