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

Function TEST_F

dnn/test/cuda/rng.cpp:417–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415} // anonymous namespace
416
417TEST_F(CUDA, UNIFORM_RNG_F32) {
418 auto opr = handle_cuda()->create_operator<UniformRNG>();
419 opr->param().dtype = DTypeTrait<dtype::Float32>::enumv;
420 SyncedTensor<> t(handle_cuda(), {TensorShape{200000}, dtype::Float32()});
421 opr->exec(t.tensornd_dev(), {});
422
423 assert_uniform_correct(t.ptr_mutable_host(), t.layout().total_nr_elems());
424}
425
426TEST_F(CUDA, GAUSSIAN_RNG_F32) {
427 auto opr = handle_cuda()->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