Behavior of cblas_zgemv when array contains nan.

In NumPy (actually originally in SciPy), we found a case where multiplying a complex matrix that contains inf+nanj by a complex vector could result in nan in the output vector in positions where the corresponding rows of the inputs did not contain nan. I have a C++ program and data to demonstrate this at https://github.com/WarrenWeckesser/experiments/tree/main/c%2B%2B/accelerate-zgemv-bug. When the full matrix CC is multiplied with the vector weights, the output at element 17 is nan. When just row 17 of CC is multiplied with weights, the result is not nan.

The matrix CC does have some occurrences of inf+nanj, but not in the row that produces element 17 of the output.

Is this a bug? Is there some way that the value inf+nanj in the input matrix can "contaminate" the output in a position that should give a non-nan value?

Answered by DTS Engineer in 900492022

I asked about this internally and it seems to be a known bug (r. 183349498). I don’t have any concrete info as to when it’ll be fixed but, as always, I encourage you to retest with new beta releases of the system as we seed them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I asked about this internally and it seems to be a known bug (r. 183349498). I don’t have any concrete info as to when it’ll be fixed but, as always, I encourage you to retest with new beta releases of the system as we seed them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn. We got a response from github user Developer-Ecosystem-Engineering over in https://github.com/scipy/scipy/pull/25696, which mentions the creation of that ticket.

(The forum wouldn't let me respond directly to your answer. It has been telling "try again in a few minutes" for over an hour.)

We got a response from github user Developer-Ecosystem-Engineering

Cool.

The forum wouldn't let me respond directly to your answer.

Yeah, that’s been a problem recently )-: See here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Behavior of cblas_zgemv when array contains nan.
 
 
Q