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

Function TEST

compiler/test/kernel/opr/arm/benchmark_typecvt.cpp:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6#ifdef ENABLE_KERNEL_BENCHMARK
7TEST(AARCH64, BENCHMARK_TYPECVT) {
8 Benchmarker<TypeCvtForward> benchmarker(Arch::ARM64);
9 std::vector<std::pair<megdnn::DType, megdnn::DType>> types = {
10 {dtype::Uint8(), dtype::Float32()},
11 {dtype::QuantizedS8(0.3f), dtype::Float32()},
12 {dtype::Float32(), dtype::QuantizedS8(1.7f)},
13 {dtype::QuantizedS8(1.7f), dtype::QuantizedS8(0.3f)}};
14
15 for (auto type : types) {
16 benchmarker.set_dtype(0, type.first);
17 benchmarker.set_dtype(1, type.second);
18 benchmarker.execs({{1, 16, 1024, 1024}, {1, 16, 1024, 1024}}).print();
19 }
20}
21#endif

Callers

nothing calls this directly

Calls 2

printMethod · 0.80
execsMethod · 0.45

Tested by

no test coverage detected