MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / TEST_F

Function TEST_F

dnn/test/cambricon/rng.cpp:10–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace test {
9
10TEST_F(CAMBRICON, UNIFORM_RNG_F32) {
11 auto opr = handle_cambricon()->create_operator<UniformRNG>();
12 opr->param().dtype = DTypeTrait<dtype::Float32>::enumv;
13 SyncedTensor<> t(handle_cambricon(), {TensorShape{200000}, dtype::Float32()});
14 opr->exec(t.tensornd_dev(), {});
15 assert_uniform_correct(t.ptr_mutable_host(), t.layout().total_nr_elems());
16}
17
18TEST_F(CAMBRICON, GAUSSIAN_RNG_F32) {
19 auto opr = handle_cambricon()->create_operator<GaussianRNG>();

Callers

nothing calls this directly

Calls 9

assert_uniform_correctFunction · 0.85
get_mean_varFunction · 0.85
absFunction · 0.50
paramMethod · 0.45
execMethod · 0.45
total_nr_elemsMethod · 0.45
layoutMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected