[query] Fixed bug where hl.nd.qr didn't support 0 elements#10227
Merged
danking merged 3 commits intohail-is:mainfrom Mar 29, 2021
Merged
[query] Fixed bug where hl.nd.qr didn't support 0 elements#10227danking merged 3 commits intohail-is:mainfrom
danking merged 3 commits intohail-is:mainfrom
Conversation
Member
|
LAPACK/MKL documentation says |
Member
|
That's weird about the M=0 case. The LAPACK version (source here) returns |
Contributor
Author
|
Ah ok, I'll just change the allocation and leave |
patrick-schultz
approved these changes
Mar 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not sure this is the right fix. The segfault was coming from dgeqrf itself, and it was happening only when
Nis 0 (Mbeing 0 was fine). The real issue is that whenNis 0, LAPACK computesLWORKto be 0, meaning we don't actually allocate any memory for theWORKarray and we segfault. To contrast, if I do a workspace size query for shape(0, 10), I get320forLWORK. This also seems wrong though, as you shouldn't really need any work space for an empty matrix?Anyway, the segfault preventing fix was just to make sure LWORK was at least 1. I was hoping you (Patrick) could use Julia interface to play with the LAPACK functions and see what behavior you notice, and if it's consistent with the above.