Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ravel chunking #63

Merged
merged 2 commits into from
Sep 29, 2017
Merged

Fix ravel chunking #63

merged 2 commits into from
Sep 29, 2017

Conversation

jakirkham
Copy link
Owner

@jakirkham jakirkham commented Sep 29, 2017

Drop use of concatenate as it is drawing all chunks into memory. Rechunk a to make the ravel operation trivial. Fix chunk adjustment for the last axis.

Note: This ends up being slower than ravel that is available in newer versions of Dask.

When using `atop`, our internal `ravel` implementation was setting the
chunks of the first axis of the input. However it should be setting the
chunks of the new axis in the output instead, which is what we change it
to here.
The `atop`-based `ravel` implementation was previously using the
`concatenate` argument with `atop`. This apparently was pulling the
whole array into memory at once, which is probably a bad idea. To fix
that, we drop the `concatenate` argument. However that means we need to
make some other changes as well. So we `rechunk` beforehand such that
the last dimension is equivalent to the array's shape. This makes
`ravel` a trivial operation for each chunk.
@jakirkham jakirkham merged commit f17a2d2 into master Sep 29, 2017
@jakirkham jakirkham deleted the fix_ravel_chks branch September 29, 2017 21:28
@jakirkham jakirkham mentioned this pull request Sep 29, 2017
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.

1 participant