Skip to content

Conversation

@ethanluoyc
Copy link
Contributor

@ethanluoyc ethanluoyc commented Jul 20, 2018

This PR intends to add batched version of potrf (see #7500).

On CPU, this is implemented as a for loop which then calls MKL's potrf. On the GPU, MAGMA has
a batched version of potrf so we use that.

Currently there is still some cleanup to do. I am putting this up here so that nobody else will duplicate the effort.

@ethanluoyc ethanluoyc changed the title [WIP] Batched version of potrf [WIP] Add batched version of potrf Jul 20, 2018
@zou3519
Copy link
Contributor

zou3519 commented Jul 24, 2018

@ethanluoyc thanks for the contribution! I can review this after you're done with it; feel free to ping with any questions;

@zou3519 zou3519 self-assigned this Jul 24, 2018
@ethanluoyc
Copy link
Contributor Author

@zou3519 one very general question though.
Ideally, there will be a bunch of batched operators. (batched gesv, cholesky etc).
How do you suggest we encourage reuse the code for batching when we implement these operators?

@zou3519
Copy link
Contributor

zou3519 commented Jul 24, 2018

I implemented batch gesv a while ago as a part of torch.gesv: #6100

For API cleanliness, it would be nice for the batched operations and unbatched operations to be a part of the same function, like torch.gesv.

@vishwakftw
Copy link
Contributor

What is the status of this PR?

@ethanluoyc
Copy link
Contributor Author

@zou3519 I am having some issue with passing the tests. What I currently have is a simple wrapper around dpotrf_. I can't find out why this is giving me the wrong result. Would you be able to take a breif look and see if there are obvious mistakes?

@t-vi
Copy link
Collaborator

t-vi commented Sep 18, 2018

Hi.
I accidentally wrote out a batch potrf without being aware of this PR.
On the up side, I think I have a working batch potrf forward based on top of @vishwakftw batched inverse #9949 , and also batched tril and triu to go with it (which I think you would have hit soonish). I am currently testing the backward (mainly working around no batched vector->diagonal matrix function and batchifying ops).

My apologies for not checking before going this far.

@t-vi t-vi mentioned this pull request Sep 18, 2018
@vishwakftw
Copy link
Contributor

This can be closed since batched cholesky is merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants