This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C67x DSPLIB DP matrix multiply bug?



I have an application that is pretty heavy on double precision matrix
operations, so I have been trying to replace our matrix multiplication with the
optimized function in the C6700 DSPLIB (DSPF_dp_mat_mul). I have found that
when I multiply a 5x206 matrix by a 206x5 matrix (getting a 5x5 matrix as an
output), the DSPF_dp_mat_mul routine blows up. When I replace the DSPLIB
routine with its "equivalent" C code, everything runs fine.

Initially, I had some problems because I was passing in Nx1 vectors in other
locations and getting some crashes. I saw that r1, c1, c2 must be all > 1,
so I now fall back to C routines in those cases. There are also some notes
about extra loads with odd dimensions. My matrix arrays are padded so that
extra loads should not overlap with adjacent arrays.

The single precision implementation does not document restrictions on odd
dimensions, or dimensions of 1. I have not tested with the SP version to see if
it chokes here. Also, I noticed that the C674x version of DSPLIB does not have
any double precision routines.

Is anybody aware of whether the DSPF_dp_mat_mul routine fails for odd x odd
output matrices?
  • Alex Barry said:
    Is anybody aware of whether the DSPF_dp_mat_mul routine fails for odd x odd
    output matrices?

    Yes, this us a known bug:

    DSPF_dp_mat_mul function in v2 of DSPLIB does not work for odd rows and columns

    As this the C67x DSPLib is not being updated anymore, we ask you to use the C version as a workaround (in \lib\dsp67x_c.src). We suggest that you compile with optimization (-o2 or -o3) to get a good performance.