Skip to content

Commit

Permalink
optimize ci speed in expensive eager test (#8504)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Shenghang Tsai <jackalcooper@gmail.com>
  • Loading branch information
3 people authored Jun 29, 2022
1 parent 99b1eff commit 3654513
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 63 deletions.
12 changes: 6 additions & 6 deletions python/oneflow/test/expensive/test_convtranspose.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def test_ConvTranspose1d(test_case):
for arg in GenArgList(arg_dict):
arg[0](test_case, *arg[1:])

@autotest()
@autotest(n=5)
def test_ConvTranspose1d_(test_case):
channels = random(1, 6)
m = torch.nn.ConvTranspose1d(
Expand All @@ -299,7 +299,7 @@ def test_ConvTranspose1d_(test_case):
return y

@unittest.skipIf(os.getenv("ONEFLOW_TEST_CPU_ONLY"), "only test cpu cases")
@autotest(n=30)
@autotest(n=5)
def test_deconv1d_group_with_random_data(test_case):
channels = 720 # lcm(1, 2, 3, 4, 5, 6)
m = torch.nn.ConvTranspose1d(
Expand All @@ -322,7 +322,7 @@ def test_deconv1d_group_with_random_data(test_case):
y = m(x)
return y

@autotest()
@autotest(n=5)
def test_ConvTranspose3d_(test_case):
channels = random(1, 2)
m = torch.nn.ConvTranspose3d(
Expand All @@ -343,17 +343,17 @@ def test_ConvTranspose3d_(test_case):
return y

@unittest.skipIf(os.getenv("ONEFLOW_TEST_CPU_ONLY"), "only test cpu cases")
@autotest(n=15)
@autotest(n=5)
def test_deconv3d_group_with_random_data(test_case):
channels = 720 # lcm(1, 2, 3, 4, 5, 6)
channels = 120 # lcm(1, 2, 3, 4, 5)
m = torch.nn.ConvTranspose3d(
in_channels=channels,
out_channels=channels,
kernel_size=random(1, 4),
stride=random() | nothing(),
padding=random(1, 3).to(int) | nothing(),
dilation=random(1, 5) | nothing(),
groups=random(1, 7),
groups=random(1, 6),
padding_mode=constant("zeros") | nothing(),
)
m.train(random())
Expand Down
Loading

0 comments on commit 3654513

Please sign in to comment.