Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Conversation

@btracey
Copy link
Member

@btracey btracey commented Dec 16, 2015

No description provided.

@btracey
Copy link
Member Author

btracey commented Dec 16, 2015

Woo!

This provides a partial implementation of Dgesvd. It only supports the case where the full U and V are computed. We had previously thought we may only support computing U and V (no option to not). I'm not entirely sure anymore this is a good idea, as this is a huge amount of memory overhead if m >> n.

A full implementation of the function is ~ 10x more work. We could possibly not support overwriting the initial A. This would save a bunch of work as this is the confusing case. The strides are hard to parse because of row/column major differences.

@kortschak Do you know what the "superb" field means? Is it possible to have a specific SVDJob type, or should I switch those types?

I fixed a bug in Dorgbr and edited the tests, but I'm not convinced the current implementation is correct. It seems like Q should have to be m x n and not m x k, but the SVD tests fail if I change that logic. I don't understand from the comment why Q should be m x k. If someone could take a second glance it would be appreciated.

@kortschak
Copy link
Member

Do you know what the "superb" field means? Is it possible to have a specific SVDJob type, or should I switch those types?

Where?

@btracey
Copy link
Member Author

btracey commented Dec 18, 2015

Superb field is the last entry in the clapack code. I have work there, but I'm not sure that's what that means (no other function so far takes in temporary memory). The svdjob type is an individual one I created here, the autogenerated code takes in an unnamed job

@btracey
Copy link
Member Author

btracey commented Dec 18, 2015

I'm almost done with the svd implementation ignoring overwrite. I then need to figure out how to write tests. No point in reviewing until that's correct (aside from cgo questions)

@kortschak
Copy link
Member

kortschak commented Dec 19, 2015 via email

@btracey
Copy link
Member Author

btracey commented Dec 30, 2015

Okay, found a few bugs that make things make more sense. Getting close to a working implementation.

@btracey
Copy link
Member Author

btracey commented Dec 31, 2015

It almost works now. It works if dgebd2 is called instead of the loop in dgebrd. This implies there is something wrong with the Dgebrd loop, but I don't see it.

@btracey
Copy link
Member Author

btracey commented Jan 4, 2016

Found it finally

@btracey
Copy link
Member Author

btracey commented Jan 4, 2016

Okay! I think this works now.

I don't know how to test the "insufficient work" branches in an automated manner as the recommended work is bigger than just one greater. I did test them by hand and they work.

PTAL!

cgo/lapack.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and on the next three lines use spaces for the alignment of the second column.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: All M m columns ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@vladimir-ch
Copy link
Member

I'll try to take a look at the code itself later.

@btracey
Copy link
Member Author

btracey commented Jan 4, 2016

Done. Thanks for the comments.

cgo/lapack.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jobV should be jobVT

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

native/dgesvd.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ir/ir:/

@kortschak
Copy link
Member

LGTM after comments addressed, but wait for @vladimir-ch.

@btracey
Copy link
Member Author

btracey commented Jan 6, 2016

Addressed PR comments, minus the outstanding issue about what to do with minwork. PTAL @vladimir-ch

cgo/lapack.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/M columns/m columns/

Also below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@vladimir-ch
Copy link
Member

What a joy every time I encountered if wantuo or if wantvo in the code. LGTM. Thanks!

@btracey
Copy link
Member Author

btracey commented Jan 7, 2016

That was my thought too! If you want to figure out the correct mapping of the strides, I could be convinced to cede that job

# The first commit's message is:
fix merge

# The 2nd commit message will be skipped:

#	Add Dgesvd and test

# The 3rd commit message will be skipped:

#	implemented work thing
btracey added a commit that referenced this pull request Jan 7, 2016
@btracey btracey merged commit 55aafd8 into master Jan 7, 2016
@btracey btracey deleted the adddgesvd branch January 7, 2016 05:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants