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

Function TEST_F

dnn/test/cuda/cond_take.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace test;
8
9TEST_F(CUDA, COND_TAKE) {
10 auto opr_naive = handle_naive()->create_operator<CondTake>();
11 auto opr_cuda = handle_cuda()->create_operator<CondTake>();
12
13 size_t tot_size = 0;
14 for (auto&& i : CondTakeTestcase::make()) {
15 auto ret_naive = i.run(opr_naive.get()), ret_cuda = i.run(opr_cuda.get());
16 MEGDNN_ASSERT_TENSOR_EQ(*ret_naive.first, *ret_cuda.first);
17 MEGDNN_ASSERT_TENSOR_EQ(*ret_naive.second, *ret_cuda.second);
18 tot_size += ret_naive.first->layout.total_nr_elems();
19 }
20 ASSERT_GT(tot_size, (size_t)0);
21}
22
23// vim: syntax=cpp.doxygen

Callers

nothing calls this directly

Calls 4

makeFunction · 0.50
runMethod · 0.45
getMethod · 0.45
total_nr_elemsMethod · 0.45

Tested by

no test coverage detected