ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

NEGEMMLowpMatrixMultiplyCore error result

Open TPcoding opened this issue 5 years ago • 1 comments

Version: arm_compute_version=v21.05 Build options: {'arch': 'arm64-v8a', 'opencl': '0', 'neon': '1', 'build': 'native', 'debug': '1', 'os': 'linux'} Git hash=f7399fd616cc8ccedfae668da3023e589a7ef558 Platform: Linux Operating System: Linux localhost.localdomain 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux Problem description: NEGEMMLowpMatrixMultiplyCore In demo: examples/neon_gemm_qasymm8.cpp change fill src0 src1 with [-1,1] , zero point !=0,NEGEMMLowpMatrixMultiplyCore s32 output be unexpected. data type DataType::QASYMM8. ACL Document : https://arm-software.github.io/ComputeLibrary/v21.05/classarm__compute_1_1_n_e_g_e_m_m_lowp_offset_contribution_kernel.xhtml NEGEMMLowpOffsetContributionKernel //mm_result[i][k] = mm_result[i][k] + (vector_sum_col[k] * a_offset) + (vector_sum_row[i] * b_offset) + (a_offset * b_offset * k) I think need change like this: Q=(R-Z)*S;
//mm_result[i][k] = mm_result[i][k] - (vector_sum_col[k] * a_offset) - (vector_sum_row[i] * b_offset) + (a_offset * b_offset * k) At this function arm_compute::::run_offset_contribution ,I change subtract row/col offset , result be right.

TPcoding avatar Jun 11 '21 09:06 TPcoding

In function NEFullyConnectedLayer::configure_mm,I find this: // Since we need negative offsets for computing convolution, we need to change QuantizationInfo() // Extract and negate input and weights offset

TPcoding avatar Jun 15 '21 09:06 TPcoding