ggerganov commited on
Commit
2f68de6
·
unverified ·
1 Parent(s): ba89f8d

ggml : add alternative cblas_sgemm call

Browse files
Files changed (1) hide show
  1. ggml.c +12 -3
ggml.c CHANGED
@@ -4590,13 +4590,22 @@ void ggml_compute_forward_mul_mat_f16_f32(
4590
  // }
4591
  //}
4592
 
4593
- // zT = y * xT
4594
  {
 
 
4595
  cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans,
4596
  ne11, ne01, ne10,
4597
- 1.0f, y, ne10,
4598
- x, ne10,
4599
  0.0f, d, ne01);
 
 
 
 
 
 
 
 
4600
  }
4601
  }
4602
  }
 
4590
  // }
4591
  //}
4592
 
 
4593
  {
4594
+ #if 1
4595
+ // zT = y * xT
4596
  cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans,
4597
  ne11, ne01, ne10,
4598
+ 1.0f, y, ne00,
4599
+ x, ne00,
4600
  0.0f, d, ne01);
4601
+ #else
4602
+ // zT = (xT * y)T
4603
+ cblas_sgemm(CblasColMajor, CblasTrans, CblasNoTrans,
4604
+ ne01, ne11, ne10,
4605
+ 1.0f, x, ne00,
4606
+ y, ne00,
4607
+ 0.0f, d, ne01);
4608
+ #endif
4609
  }
4610
  }
4611
  }