From: Jin Bo Date: Sat, 5 Dec 2020 07:06:12 +0000 (+0800) Subject: Fix test errors reported by cblas_cgemm & cblas_ctrmm X-Git-Tag: upstream/0.3.21~22^2~11^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65de6f5957f9940ed338c1fdef251dbad70eb908;p=platform%2Fupstream%2Fopenblas.git Fix test errors reported by cblas_cgemm & cblas_ctrmm The file cgemm_kernel_8x4_msa.c holds the MSA optimization codes of cblas_cgemm and cblas_ctrmm. It defines two macros: CGEMM_SCALE_1X2 and CGEMM_TRMM_SCALE_1X2. The pc1 array index in the two macros should be 0 and 1. --- diff --git a/kernel/mips/cgemm_kernel_8x4_msa.c b/kernel/mips/cgemm_kernel_8x4_msa.c index 4b3637c7..8b624be8 100644 --- a/kernel/mips/cgemm_kernel_8x4_msa.c +++ b/kernel/mips/cgemm_kernel_8x4_msa.c @@ -758,10 +758,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pc0[1] += alphar * res1; \ pc0[1] += alphai * res0; \ \ - pc1[2] += alphar * res2; \ - pc1[2] -= alphai * res3; \ - pc1[3] += alphar * res3; \ - pc1[3] += alphai * res2; \ + pc1[0] += alphar * res2; \ + pc1[0] -= alphai * res3; \ + pc1[1] += alphar * res3; \ + pc1[1] += alphai * res2; \ } #define CGEMM_SCALE_1X1 \ @@ -1067,10 +1067,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pc0[1] = alphar * res1; \ pc0[1] += alphai * res0; \ \ - pc1[2] = alphar * res2; \ - pc1[2] -= alphai * res3; \ - pc1[3] = alphar * res3; \ - pc1[3] += alphai * res2; \ + pc1[0] = alphar * res2; \ + pc1[0] -= alphai * res3; \ + pc1[1] = alphar * res3; \ + pc1[1] += alphai * res2; \ } #define CGEMM_TRMM_SCALE_1X1 \