File tree Expand file tree Collapse file tree 3 files changed +15
-18
lines changed
backends/cadence/hifi/operators Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ using torch::executor::apply_binary_elementwise_fn;
23
23
using torch::executor::Error;
24
24
using torch::executor::resize_to_broadcast_target_size;
25
25
26
-
27
26
namespace cadence {
28
27
namespace impl {
29
28
namespace HiFi {
Original file line number Diff line number Diff line change @@ -351,4 +351,3 @@ Tensor& pow_Scalar_out(
351
351
} // namespace HiFi
352
352
} // namespace impl
353
353
} // namespace cadence
354
-
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ using ::executorch::aten::Tensor;
26
26
using ::executorch::runtime::getLeadingDims;
27
27
using ::executorch::runtime::KernelRuntimeContext;
28
28
29
-
30
- // The nnlib kernel to compute quantized linear via matmul.
29
+ // The nnlib kernel to compute quantized linear via matmul.
31
30
32
31
void _quantized_linear_asym8u (
33
32
const Tensor& in,
@@ -48,22 +47,22 @@ void _quantized_linear_asym8u(
48
47
const int32_t * __restrict__ bias_data = bias.const_data_ptr <int32_t >();
49
48
uint8_t * __restrict__ out_data = out.mutable_data_ptr <uint8_t >();
50
49
int32_t ret = xa_nn_matmul_asym8uxasym8u_asym8u (
51
- out_data,
52
- weight_data,
53
- in_data,
54
- bias_data,
55
- out_dim,
56
- in_dim,
57
- in_dim,
58
- leading_dims,
59
- in_dim,
60
- out_dim,
61
- 1 ,
50
+ out_data,
51
+ weight_data,
52
+ in_data,
53
+ bias_data,
54
+ out_dim,
55
+ in_dim,
56
+ in_dim,
57
+ leading_dims,
58
+ in_dim,
59
+ out_dim,
60
+ 1 ,
62
61
-weight_zero_point.const_data_ptr <int32_t >()[0 ], // mat1_zero_bias
63
62
-in_zero_point, // mat2_zero_bias
64
- out_multiplier.const_data_ptr <int32_t >()[0 ],
65
- out_shift.const_data_ptr <int32_t >()[0 ],
66
- out_zero_point);
63
+ out_multiplier.const_data_ptr <int32_t >()[0 ],
64
+ out_shift.const_data_ptr <int32_t >()[0 ],
65
+ out_zero_point);
67
66
ET_DCHECK_MSG (ret == 0 , " HiFi quantized::linear failed" );
68
67
}
69
68
You can’t perform that action at this time.
0 commit comments