-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Migrate Blockwise to use taskspec #1159
Conversation
subgraphs = {} | ||
for _expr in self.exprs: | ||
if isinstance(_expr, Fused): | ||
subgraph, name = _expr._task(index)[1:3] | ||
graph.update(subgraph) | ||
graph[(name, index)] = name | ||
elif self._broadcast_dep(_expr): | ||
# When _expr is being broadcasted, we only | ||
# want to define a fused task for index 0 | ||
graph[(_expr._name, 0)] = _expr._task(0) | ||
if self._broadcast_dep(_expr): | ||
subname = (_expr._name, 0) | ||
else: | ||
graph[(_expr._name, index)] = _expr._task(index) | ||
subname = (_expr._name, index) | ||
subgraphs[subname] = _expr._task(subname, subname[1]) | ||
|
||
for i, dep in enumerate(self.dependencies()): | ||
graph[self._blockwise_arg(dep, index)] = "_" + str(i) | ||
subgraphs[self._blockwise_arg(dep, index)] = "_" + str(i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to admit that I don't understand what's going on here but I just went ahead and translated the existing code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the failures look related
hmm, there are problems when running the dask/dask tests with |
Fix is dask/dask#11495 I will not change the CI config to test this. I can retrigger once dask/dask is merged |
Final problem is dask/dask#11496 the test asserts on the pickled graph size which is blowing up with this since deduplication is not working well. That function caching layer was introduced a little prematurely so let's rip it out and deal with this later |
8e90ad5
to
f2223dc
Compare
dask/dask-expr#1159 made upstream changes in `dask-expr` to use `TaskSpec`, this PR updates `dask-cudf` to be compatible with those changes. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Richard (Rick) Zamora (https://github.com/rjzamora) URL: #17285
This is migrating the blockwise expressions and connected ones to the new task spec.
I ran into interesting issues while ripping out the recursion in #1158 and wanted to do this step here first.