Skip to content

Backend-aware dtype inference for single-chunk svd#6623

Merged
TomAugspurger merged 1 commit intodask:masterfrom
eric-czech:svd_meta
Sep 11, 2020
Merged

Backend-aware dtype inference for single-chunk svd#6623
TomAugspurger merged 1 commit intodask:masterfrom
eric-czech:svd_meta

Conversation

@eric-czech
Copy link
Contributor

@eric-czech eric-czech commented Sep 11, 2020

  • Tests added / passed
  • Passes black dask / flake8 dask

This is a follow-up from #6616 (comment).

As @pentschev and @TomAugspurger suggested, this will run svd using a tiny, non-empty array via whatever backend the given dask array is already wrapping. I only needed this to get the dtypes for the results, and I assume the semantics for the result types could be different for numpy/cupy so this seems like the clearest way to ensure that the dtype passed to from_delayed accurately reflects what would come out of any svd function dispatched to from np.linalg.svd.

@TomAugspurger
Copy link
Member

Thanks!

@pentschev
Copy link
Member

Somehow I missed this PR. There was a small issue with this and another with #6616 that are now being fixed in #6727 . Thanks for the work on improving SVD consistency @eric-czech !

kumarprabhu1988 pushed a commit to kumarprabhu1988/dask that referenced this pull request Oct 29, 2020
Co-authored-by: Eric Czech <eric@related.vc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants