Closed cdeterman closed 9 years ago
for the first element in C, 11 x 11 + 12x21 + 13x31 + 14x41 + 15 x 51 = 121+252+403+574+765=2115, which is the answer clBLAS gave. I am not familiar with the syntax in R. Are you sure it is doing the same matrix multiplication?
@TimmyLiu I seem to have a knack for embarrassing questions here. I spent last last few hours fighting with this and it was because I didn't have an argument in R byrow=TRUE
. The matrices were conformable but didn't have the same elements in the two places. I am glad to confirm that the code is working correctly. The numbers match now. Thank you for your attention and sorry for another silly issue.
I am trying to adapt the example_sgemm.c file for a full matrix multiplication (not the 'lower-right submatrix'). However I can not figure out how to get the numbers to come out correctly.
If I take the exact matrices to another language like R. I get the output between the matrices simply with this:
Now, I saw this previously closed issue #15 and tried adapt the statements to set the offsets to zero. I also set the
alpha = 1
andbeta=0
. But the output returned is:I have been trying for hours to just do what should be a relatively simple task but have come up short. Could someone please help me sort out what is causing the numbers to be different when the inputs are identical? Clearly I must have made some mistake in my arguments to
clblasSgemm
. I have provided my current file in a temporary repository here.