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

Function TEST_F

dnn/test/cuda/mesh_indexing.cpp:10–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace test;
9
10TEST_F(CUDA, MESH_INDEXING) {
11 Checker<MeshIndexing> checker(handle_cuda());
12 size_t idx_size0, idx_size1;
13 IndexRNG rng0{idx_size0, 2}, rng1{idx_size1, 3};
14 checker.set_dtype(0, dtype::Float32())
15 .set_dtype(1, dtype::Float32())
16 .set_dtype(2, dtype::Int32())
17 .set_dtype(3, dtype::Int32())
18 .set_rng(2, &rng0)
19 .set_rng(3, &rng1);
20
21 SmallVector<size_t> init_axes;
22
23 idx_size0 = 23;
24 init_axes = {0};
25 checker.set_proxy({init_axes})
26 .execs({{23}, {100}, {100}})
27 .execs({{23, 5}, {100, 5}, {100}});
28
29 idx_size0 = 3;
30 init_axes = {1};
31 checker.set_proxy({init_axes})
32 .execs({{2, 3}, {2, 10}, {10}})
33 .execs({{2, 3, 5}, {2, 50, 5}, {50}})
34 .execs({{2, 3, 5, 7}, {2, 55, 5, 7}, {55}});
35
36 idx_size0 = 23;
37 idx_size1 = 17;
38 init_axes = {3, 1};
39 checker.set_proxy({init_axes})
40 .execs({{3, 17, 9, 23}, {3, 100, 9, 100}, {100}, {100}})
41 .execs({{3, 17, 29, 30}, {3, 66, 29, 99}, {99}, {66}});
42}
43
44TEST_F(CUDA, BATCHED_MESH_INDEXING) {
45 Checker<BatchedMeshIndexing> checker(handle_cuda());

Callers

nothing calls this directly

Calls 4

set_dtypeMethod · 0.80
execsMethod · 0.45
broadcastMethod · 0.45
execlMethod · 0.45

Tested by

no test coverage detected