mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
update test fixture (#89796)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89796 Approved by: https://github.com/davidberard98
This commit is contained in:
committed by
PyTorch MergeBot
parent
513b5da357
commit
a2ac25f63e
BIN
test/jit/fixtures/test_versioned_random_func_v10.ptl
Normal file
BIN
test/jit/fixtures/test_versioned_random_func_v10.ptl
Normal file
Binary file not shown.
BIN
test/jit/fixtures/test_versioned_random_out_v10.ptl
Normal file
BIN
test/jit/fixtures/test_versioned_random_out_v10.ptl
Normal file
Binary file not shown.
BIN
test/jit/fixtures/test_versioned_random_v10.ptl
Normal file
BIN
test/jit/fixtures/test_versioned_random_v10.ptl
Normal file
Binary file not shown.
@ -57,3 +57,31 @@ class TestVersionedGeluOutV9(torch.nn.Module):
|
||||
def forward(self, x):
|
||||
out = torch.zeros_like(x)
|
||||
return torch._C._nn.gelu(x, out=out)
|
||||
|
||||
class TestVersionedRandomV10(torch.nn.Module):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def forward(self, x):
|
||||
out = torch.zeros_like(x)
|
||||
return out.random_(0, 10)
|
||||
|
||||
|
||||
class TestVersionedRandomFuncV10(torch.nn.Module):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def forward(self, x):
|
||||
out = torch.zeros_like(x)
|
||||
return out.random(0, 10)
|
||||
|
||||
|
||||
class TestVersionedRandomOutV10(torch.nn.Module):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def forward(self, x):
|
||||
x = torch.zeros_like(x)
|
||||
out = torch.zeros_like(x)
|
||||
x.random(0, 10, out=out)
|
||||
return out
|
||||
|
@ -96,6 +96,9 @@ ALL_MODULES = {
|
||||
TestVersionedLogspaceOutV8(): "aten::logspace.out",
|
||||
TestVersionedGeluV9(): "aten::gelu",
|
||||
TestVersionedGeluOutV9(): "aten::gelu.out",
|
||||
TestVersionedRandomV10(): "aten::random_.from",
|
||||
TestVersionedRandomFuncV10(): "aten::random.from",
|
||||
TestVersionedRandomOutV10(): "aten::random.from_out",
|
||||
}
|
||||
|
||||
"""
|
||||
|
Reference in New Issue
Block a user