-
Notifications
You must be signed in to change notification settings - Fork 11
Add dlarts #36
Conversation
|
Not ready for submission. Dlarts is necessary for Dgecon (Compute condition number from QR facotrization) and Dtrcon (compute condition of triangular matrix, which can be used from LU to compute the condition number). In the normal case, this function mostly just calls Dtrsv. In the case where the matrix is badly conditioned, it does all sorts of crazy things. Any ideas on testing? For the badly conditioned cases in BLAS I created the ill conditioned cases by hand (for the Givens rotation cases). Here though, there are many possible code paths, so I can't construct a suffient set by hand. Additionally, it's meant to protect against bad scaling, so we can't compare the output to Dtrsv (because it shouldn't be the same), and I'm worried about testing that A * x = b, because presumably we would need also need to be careful with scaling. At the least, I'll need to do a second pass with visual inspection. |
|
You should be able to use dvykov's go-fuzz to build a minimal corpus that tests all paths with some fiddling. |
|
If you're going to try out fuzz, I think you'll first want to write byte encoders / decoders for the various blas types. |
|
We have one for Dense already, the rest can be copied from a created Dense.
|
One what? A go-fuzz example, or a comparison for triangular solve? |
|
We have a binary encoder. This means that a fuzzer can be written with a corpus of encoded matrices from the original handwritten test cases. The other matrix types can be created from the decoded Dense. |
|
Okay, I ran a fuzzer against it for a while so I think it's free of panics. Unfortunately, there is no cgo version of the algorithm so I cannot compare outputs. PTAL |
|
Pity Dlatrs doesn't exist in the cgo. I'll have a look some time over the weekend. |
|
Change the PR title to reflect the function name? |
native/dlatrs.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/notrans/noTrans/g
s/nonunit/nonUnit/g
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
LGTM with minor comments. |
|
s/dlarts/dlatrs/ in name, but doesn't matter.
|
No description provided.