MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BenchmarkRCC

Function BenchmarkRCC

tensorflow/lite/experimental/ruy/benchmark.cc:40–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39template <typename TestSetType>
40std::vector<std::unique_ptr<TestResult<DstScalar>>> BenchmarkRCC(
41 const BenchmarkShape& shape) {
42 TestSetType test_set;
43 test_set.rows = shape.rows;
44 test_set.depth = shape.depth;
45 test_set.cols = shape.cols;
46 test_set.lhs_order = Order::kRowMajor;
47 test_set.rhs_order = Order::kColMajor;
48 test_set.dst_order = Order::kColMajor;
49 test_set.layout_style = LayoutStyle::kPackedLinear;
50 test_set.benchmark = true;
51 const int asymmetry_lhs = shape.symm_lhs ? 0 : 1;
52 const int asymmetry_rhs = shape.symm_rhs ? 0 : 1;
53 test_set.lhs_zero_point = SymmetricZeroPoint<LhsScalar>() + asymmetry_lhs;
54 test_set.rhs_zero_point = SymmetricZeroPoint<RhsScalar>() + asymmetry_rhs;
55 test_set.use_specified_zero_points = true;
56 test_set.perchannel = GetBoolEnvVarOrFalse("PERCHANNEL");
57 test_set.benchmark_prepack_lhs = GetBoolEnvVarOrFalse("PREPACK_LHS");
58 test_set.benchmark_prepack_rhs = GetBoolEnvVarOrFalse("PREPACK_RHS");
59 test_set.Run();
60 return std::move(test_set.results);
61}
62
63void Benchmark() {
64 const bool symm_lhs = std::is_floating_point<LhsScalar>::value ||

Callers

nothing calls this directly

Calls 2

GetBoolEnvVarOrFalseFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected