Skip to content

Commit

Permalink
add test case (DeepLink-org#286)
Browse files Browse the repository at this point in the history
* clamp,clamp_max,clamp_min

* where

* tanh

* tril

* permute

* pad

* prod

* cumsum

* cdist

* bitwise_not

* reciprocal

* bernoulli

* mm

* roll

* unfold

* expand

* copy_

* lint

* device_config

* device config

* bernoulli
  • Loading branch information
LeungChiNan authored Oct 8, 2023
1 parent 4c20dd5 commit d9a801b
Show file tree
Hide file tree
Showing 5 changed files with 759 additions and 120 deletions.
3 changes: 2 additions & 1 deletion diopi_test/python/conformance/conformance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def test_uniform(input, start=0, end=1):

def test_bernoulli(input, inplace=False, p=None):
p_numpy = input.numpy()
p = p_numpy.mean() if p is None else p
if input.numel() > 0:
p = p_numpy.mean() if p is None else p
state = build_generator_state(input.context())
generator = Generator(state)
out = F.bernoulli(input, inplace, p, generator)
Expand Down
Loading

0 comments on commit d9a801b

Please sign in to comment.