Skip to content

Commit f7329ea

Browse files
committed
resolve comments
1 parent b8d9f64 commit f7329ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

onnxruntime/core/mlas/lib/softmax_kernel_neon_fp16.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const MlasExpConstants<float16x4_t>& Get_Exp_Constants<float16x4_t>() {
121121
template<typename T>
122122
MLAS_FORCEINLINE
123123
T Exp_Vector_Fp16(T x) {
124-
const auto constants = Get_Exp_Constants<T>();
124+
const auto& constants = Get_Exp_Constants<T>();
125125
auto clamped_x = MlasClampFloat16(x, constants.LowerRange, constants.UpperRange);
126126

127127
// integral
@@ -239,7 +239,7 @@ void Exp_Kernel_Fp16(const MLAS_FP16* Input, MLAS_FP16* Output, size_t N) {
239239
template<typename T>
240240
MLAS_FORCEINLINE
241241
T SumExp_Vector_Fp16(T x, T negative_maximum) {
242-
const auto constants = Get_Exp_Constants<T>();
242+
const auto& constants = Get_Exp_Constants<T>();
243243
auto clamped_x = MlasMaximumFloat16(MlasAddFloat16(x, negative_maximum), constants.LowerRangeSumExp);
244244

245245
// integral
@@ -473,7 +473,7 @@ const MlasTanhConstants<float16x4_t>& Get_Tanh_Constants<float16x4_t>() {
473473
template <typename T>
474474
MLAS_FORCEINLINE
475475
T Tanh_Vector_Fp16(T x) {
476-
const auto constants = Get_Tanh_Constants<T>();
476+
const auto& constants = Get_Tanh_Constants<T>();
477477
x = MlasClampFloat16(x, constants.LowerRange, constants.UpperRange);
478478

479479
T x_2 = MlasMultiplyFloat16(x, x);

0 commit comments

Comments
 (0)