MCPcopy Create free account
hub / github.com/MegEngine/MegCC / TEST

Function TEST

compiler/test/kernel/opr/armv7/typecvt.cpp:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace megcc::KernelGen;
5
6TEST(ARMV7, TYPECVT) {
7 Checker<TypeCvtForward> checker(Arch::ARMV7);
8 UniformIntRNG rng(-127, 127);
9 checker.set_rng(0, &rng);
10 std::vector<std::pair<megdnn::DType, megdnn::DType>> types = {
11 {dtype::QuantizedS8(0.3f), dtype::Float32()},
12 {dtype::Float32(), dtype::QuantizedS8(1.7f)},
13 {dtype::QuantizedS8(1.7f), dtype::QuantizedS8(0.3f)},
14 {dtype::Uint8(), dtype::Float32()}};
15 for (auto type : types) {
16 checker.set_dtype(0, type.first);
17 checker.set_dtype(1, type.second);
18
19 checker.execs({{2, 10}, {2, 10}});
20 checker.execs({{2, 10, 4}, {2, 10, 4}});
21 checker.execs({{3, 4, 5, 6}, {3, 4, 5, 6}});
22 }
23}

Callers

nothing calls this directly

Calls 1

execsMethod · 0.45

Tested by

no test coverage detected