Home
last modified time | relevance | path

Searched refs:AccumScalar (Results 1 – 22 of 22) sorted by relevance

/external/ruy/ruy/
Dapply_multiplier.h41 template <typename AccumScalar, typename DstScalar>
42 void ApplyMultiplier(const MulParams<AccumScalar, DstScalar>& mul_params,
43 int channel, AccumScalar* accum);
55 template <typename AccumScalar, typename DstScalar,
56 bool IsApplicable = std::is_same<AccumScalar, std::int32_t>::value &&
61 template <typename AccumScalar, typename DstScalar>
62 struct ApplyMultiplierImpl<AccumScalar, DstScalar, false> {
63 static void Run(const MulParams<AccumScalar, DstScalar>&, int, AccumScalar*) {
67 template <typename AccumScalar, typename DstScalar>
68 struct ApplyMultiplierImpl<AccumScalar, DstScalar, true> {
[all …]
Dmul_params.h100 using AccumScalar = tAccumScalar;
104 const AccumScalar* bias() const { return storage_.bias; } in bias()
105 void set_bias(const AccumScalar* ptr) { storage_.bias = ptr; } in set_bias()
114 AccumScalar multiplier_fixedpoint() const { in multiplier_fixedpoint()
117 void set_multiplier_fixedpoint(const AccumScalar value) { in set_multiplier_fixedpoint()
139 const AccumScalar* multiplier_fixedpoint_perchannel() const { in multiplier_fixedpoint_perchannel()
143 void set_multiplier_fixedpoint_perchannel(const AccumScalar* ptr) { in set_multiplier_fixedpoint_perchannel()
205 detail::MulParamsStorage<AccumScalar, DstScalar> storage_;
215 template <typename AccumScalar, typename DstScalar>
217 static_assert(std::is_floating_point<AccumScalar>::value, "");
[all …]
Dcreate_trmul_params.h88 template <Path ThePath, typename SrcScalar, typename AccumScalar,
91 MulParams<AccumScalar, DstScalar>>>
94 MulParams<AccumScalar, DstScalar>>;
121 typename AccumScalar, typename DstScalar>
127 Kernel<ThePath, PackedLhsScalar, PackedRhsScalar, AccumScalar, DstScalar>;
190 typename RhsScalar, typename AccumScalar, typename DstScalar>
194 typename LhsScalar, typename RhsScalar, typename AccumScalar,
200 PopulateTrMulParams<kCurrentPath, LhsScalar, RhsScalar, AccumScalar,
205 AccumScalar, DstScalar>::Search(the_path, params);
211 typename RhsScalar, typename AccumScalar, typename DstScalar>
[all …]
Dperchannel_buffers_reallocation_test.cc15 template <typename AccumScalar, typename DstScalar,
17 std::is_same<AccumScalar, std::int32_t>::value &&
20 static void Run(MulParams<AccumScalar, DstScalar>* mul_params) { in Run()
21 static const AccumScalar bias_buf[kBufferSize] = {0}; in Run()
22 static const AccumScalar multiplier_fixedpoint_buf[kBufferSize] = {0}; in Run()
30 template <typename AccumScalar, typename DstScalar>
31 struct PopulatePerChannelBuffersImpl<AccumScalar, DstScalar, false> {
32 static void Run(MulParams<AccumScalar, DstScalar>* mul_params) { in Run()
33 static const AccumScalar bias_buf[kBufferSize] = {0}; in Run()
38 template <typename AccumScalar, typename DstScalar>
[all …]
Dreference_mul.h27 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
30 const MulParams<AccumScalar, DstScalar>& mul_params, in ReferenceMul() argument
34 AccumScalar accum = 0; in ReferenceMul()
36 AccumScalar lhs_val = Element(lhs, i, k); in ReferenceMul()
37 AccumScalar rhs_val = Element(rhs, k, j); in ReferenceMul()
47 accum = std::min<AccumScalar>(accum, mul_params.clamp_max()); in ReferenceMul()
48 accum = std::max<AccumScalar>(accum, mul_params.clamp_min()); in ReferenceMul()
Dkernel.h46 using AccumScalar = tAccumScalar;
76 using AccumScalar = typename Args::AccumScalar;
78 using MulParamsType = MulParams<AccumScalar, DstScalar>;
175 typename AccumScalar, typename DstScalar>
186 using MulParamsType = MulParams<AccumScalar, DstScalar>;
213 AccumScalar accum = 0;
215 AccumScalar lhs_val = Element(lhs, k, i);
216 AccumScalar rhs_val = Element(rhs, k, j);
235 accum = std::min<AccumScalar>(accum, mul_params.clamp_max());
236 accum = std::max<AccumScalar>(accum, mul_params.clamp_min());
Druy.h37 typename AccumScalar, typename DstScalar>
39 const MulParams<AccumScalar, DstScalar>& mul_params, Context* context, in Mul() argument
104 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
107 const MulParams<AccumScalar, DstScalar>& mul_params, Context* context, in Mul() argument
Dapply_multiplier_test.cc96 template <typename AccumScalar, typename DstScalar>
97 void TestApplyMultiplier(const MulParams<AccumScalar, DstScalar>& mul_params, in TestApplyMultiplier() argument
98 int channel, AccumScalar input, in TestApplyMultiplier()
99 AccumScalar expected_output) { in TestApplyMultiplier()
100 AccumScalar actual_output = input; in TestApplyMultiplier()
Dfrontend.h46 typename AccumScalar, typename DstScalar>
50 const MulParams<AccumScalar, DstScalar>& mul_params, Ctx* ctx, in MulFrontEndUpToCreateTrMulParams() argument
81 typename AccumScalar, typename DstScalar>
83 const MulParams<AccumScalar, DstScalar>& mul_params, Ctx* ctx, in MulFrontEnd() argument
Dtest_slow.cc24 using AccumScalar = RUY_TEST_ACCUMSCALAR; typedef
27 using TestSetType = TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>;
Dtest.h597 using AccumScalar = tAccumScalar;
599 using MulParamsType = MulParams<AccumScalar, DstScalar>;
657 SeparateMappingVector<AccumScalar> per_channel_multiplier_fixedpoint;
663 SeparateMappingVector<AccumScalar> bias_data;
692 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
694 TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>::~TestSet() {
709 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
711 void TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>::DoMul(
718 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
720 void TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>::EvalRuy(
[all …]
Dtest_fast.cc26 using AccumScalar = RUY_TEST_ACCUMSCALAR; typedef
29 using TestSetType = TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>;
Dkernel_common.h39 typename AccumScalar, typename DstScalar>
44 typename AccumScalar> \
45 struct Kernel<CHILD, LhsScalar, RhsScalar, AccumScalar, DstScalar> \
46 : Kernel<PARENT, LhsScalar, RhsScalar, AccumScalar, DstScalar> { \
48 : Kernel<PARENT, LhsScalar, RhsScalar, AccumScalar, DstScalar>( \
Dbenchmark.cc26 using AccumScalar = RUY_TEST_ACCUMSCALAR; typedef
28 using TestSetType = TestSet<LhsScalar, RhsScalar, AccumScalar, DstScalar>;
Dmul_params_test.cc28 static_assert(std::is_same<MulParamsType::AccumScalar, std::int32_t>::value, in TEST()
/external/tensorflow/tensorflow/lite/kernels/
Dcpu_backend_gemm_params.h113 template <typename AccumScalar, typename DstScalar,
115 std::is_floating_point<AccumScalar>::value
122 AccumScalar multiplier_fixedpoint = 0;
130 const AccumScalar* multiplier_fixedpoint_perchannel = nullptr;
140 const AccumScalar* bias = nullptr;
167 template <typename AccumScalar, typename DstScalar,
170 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params) { in ValidateGemmParams() argument
203 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
210 static_assert(!std::is_floating_point<AccumScalar>::value, "");
215 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
[all …]
Dcpu_backend_gemm_test.cc138 template <typename AccumScalar, typename DstScalar,
140 void Clamp(const GemmParams<AccumScalar, DstScalar, quantization_flavor>& src, in Clamp() argument
142 GemmParams<AccumScalar, DstScalar, quantization_flavor>* dst) { in Clamp()
181 template <typename AccumScalar, typename DstScalar>
189 if (std::is_floating_point<AccumScalar>::value) { in CheckErrorStats()
237 template <typename AccumScalar, typename DstScalar>
244 CheckErrorStats<AccumScalar, DstScalar>(error_stats, accumulation_depth); in CheckErrorForAccumulation()
250 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
258 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in PerformGemmThenCompareResultsThenAgainWithClamping() argument
264 CheckErrorForAccumulation<AccumScalar>(accumulation_depth, *dst_data, in PerformGemmThenCompareResultsThenAgainWithClamping()
[all …]
Dcpu_backend_gemm_ruy.h62 template <typename AccumScalar, typename DstScalar,
66 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in Run()
67 ruy::MulParams<AccumScalar, DstScalar>* ruy_mul_params) { in Run()
113 template <typename AccumScalar, typename DstScalar,
116 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params,
117 ruy::MulParams<AccumScalar, DstScalar>* ruy_mul_params) {
118 MakeRuyMulParamsImpl<AccumScalar, DstScalar, quantization_flavor>::Run(
122 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
129 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params,
138 ruy::MulParams<AccumScalar, DstScalar> ruy_mul_params;
Dcpu_backend_gemm.h56 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
58 struct GemmImpl : detail::GemmImplX86<LhsScalar, RhsScalar, AccumScalar,
64 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
66 struct GemmImpl : detail::GemmImplUsingRuy<LhsScalar, RhsScalar, AccumScalar,
114 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
119 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in Gemm() argument
143 detail::GemmImplUsingRuy<LhsScalar, RhsScalar, AccumScalar, DstScalar, in Gemm()
162 GemmImpl<LhsScalar, RhsScalar, AccumScalar, DstScalar, in Gemm()
Dcpu_backend_gemm_gemmlowp.h67 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
71 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
74 LhsScalar, RhsScalar, AccumScalar, DstScalar,
77 static_assert(std::is_same<AccumScalar, std::int32_t>::value, "");
129 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
131 struct GemmImplUsingGemmlowp<LhsScalar, RhsScalar, AccumScalar, DstScalar,
134 static_assert(std::is_same<AccumScalar, std::int32_t>::value, "");
181 GemmImplUsingRuy<LhsScalar, RhsScalar, AccumScalar, DstScalar,
Dcpu_backend_gemm_x86.h35 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
42 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in Run()
49 LhsScalar, RhsScalar, AccumScalar, DstScalar, in Run()
56 detail::GemmImplUsingRuy<LhsScalar, RhsScalar, AccumScalar, DstScalar, in Run()
Dcpu_backend_gemm_custom_gemv.h57 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
83 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params) { in IsSupportedGivenSufficientlyManyRows()
92 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in Run()
97 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
105 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in CustomGemvTask() argument
118 using Impl = CustomGemvImpl<LhsScalar, RhsScalar, AccumScalar, DstScalar, in Run()
131 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params_;
145 template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
151 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, in CustomGemv() argument
154 using Impl = CustomGemvImpl<LhsScalar, RhsScalar, AccumScalar, DstScalar, in CustomGemv()
[all …]