Skip to content

Commit 4dea681

Browse files
Fix MlasConvNchwcFloatKernelNeon
1 parent 18f581e commit 4dea681

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

onnxruntime/core/mlas/lib/sconv_kernel_neon.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,21 +153,22 @@ void
153153
filterBlock * (BlockSize) +
154154
ic;
155155

156-
const float* input_element = input_base + ic;
156+
const float* input_element = input_base + filterBlock;
157157
const float* input_row_start = InputBase + kh * DilatedInputWidthElements;
158158
const float* input_row_end = input_row_start + InputWidthElements;
159159

160160
float input_value;
161-
if (is_main_region && input_element >= input_row_start && input_element < input_row_end) {
161+
if (is_main_region || (input_element >= input_row_start && input_element < input_row_end)) {
162162
input_value = *input_element;
163163
} else {
164164
input_value = 0.0f;
165165
}
166166

167167
float filter_value = filter[kernel_pos];
168-
accumulator[filterBlock] += input_value * filter_value;
168+
accumulator[ic] += input_value * filter_value;
169169
}
170170
}
171+
171172
}
172173
}
173174

0 commit comments

Comments
 (0)