Theodoros Theodoridis via Phabricator
unread,Mar 7, 2018, 9:10:52 AM3/7/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ll...@meinersbur.de, siddu...@gmail.com, phabr...@grosser.es, garee...@gmail.com, poll...@googlegroups.com, llvm-c...@lists.llvm.org
ttheodor added a comment.
`gemm.cpp` is:
/* C := alpha*A*B + beta*C */
void kernel_gemm(int _PB_NI, int _PB_NJ, int _PB_NK, double alpha, double beta,
double *A, double *B, double *C) {
for (int i = 0; i < _PB_NI; i++)
for (int j = 0; j < _PB_NJ; j++) {
C[i * _PB_NJ + j] *= beta;
for (int k = 0; k < _PB_NK; ++k)
C[i * _PB_NJ + j] +=
alpha * A[i * _PB_NK + k] * B[k * _PB_NJ + j];
}
}
The one I posted in the e-mail is actually wrong (I didn't linearize properly the accesses) but incidentally exhibits the same behavior when it comes to pattern matching.
https://reviews.llvm.org/D43932