File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -7944,9 +7944,7 @@ def test_bernoulli1(self):
7944
7944
def fn (a ):
7945
7945
b = a .clone ()
7946
7946
# aten.bernoulli_() uses aten.bernoulli.p() behind the scene, so it will be decomposed.
7947
- return aten .bernoulli_ (b ).sum () / torch .prod (
7948
- torch .tensor (a .size (), device = a .device )
7949
- )
7947
+ return aten .bernoulli_ (b ).sum () / torch .prod (torch .tensor (a .size ()))
7950
7948
7951
7949
p = 0.3
7952
7950
self .common (
@@ -7961,9 +7959,7 @@ def fn(a):
7961
7959
@skip_if_triton_cpu
7962
7960
def test_bernoulli2 (self ):
7963
7961
def fn (a ):
7964
- return aten .bernoulli (a ).sum () / torch .prod (
7965
- torch .tensor (a .size (), device = a .device )
7966
- )
7962
+ return aten .bernoulli (a ).sum () / torch .prod (torch .tensor (a .size ()))
7967
7963
7968
7964
p = 0.3
7969
7965
self .common (
You can’t perform that action at this time.
0 commit comments