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
Clean up #4672
Clean up #4672
Conversation
@@ -468,4 +469,4 @@ def use_gpu_cumsumop(op, ctx_name, inputs, outputs): | |||
if axis is None: | |||
axis = 0 | |||
assert isinstance(x.type, GpuArrayType) | |||
return GpuCumsum(axis)(x) | |||
return GpuCumsum(axis, ctx_name)(x) |
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 felt it is better to pass the context_name. Will change if necessary
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.
As documented here, the best practice is to infer the context during make_node
, not to force the context when creating the Op.
Please remove the context_name
attribute.
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.
Yeah, i'll remove that commit.
In line:467 of |
In this PR, i've removed |
gpu_seqopt.register('gpuarray_local_optimiziations', gpu_optimizer, 1, | ||
'fast_compile', 'fast_run', 'gpuarray') | ||
gpu_seqopt.register('gpuarray_cut_transfers', gpu_cut_copies, 2, | ||
'fast_compile', 'fast_run', 'gpuarray') | ||
|
||
gpu_seqopt.register('op_lifter_topo', TopoOptimizer(gpu_topo.query('+fast_compile'), order='out_to_in'), | ||
10, 'fast_run', 'gpuarray', 'fast_compile') |
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.
Use something between -0.5 and 1 instead of 10 here.
It seems to make sense for a first draft of the backward pass (using TopoOptimizer and LocalGroupDB). |
Could you please elaborate on this ? |
EquilibriumDB has "tracks", or ops to match when trying to apply its local optimizers. For instance, some local optimizers will only be tried on nodes corresponding to some Ops. It uses the Ops passed to the |
From what I see,LocalGroup does not use that info. LocalOptimizer uses track but I don't think LocalGroup does. I'll confirm again once. |
@nouiz The new optimizer |
Can one of the admins verify this patch? |
We're registering |
@@ -22,8 +22,9 @@ class GpuCumsum(GpuKernelBase, Op): | |||
SUPPORTED_NDIMS = 3 | |||
__props__ = ('axis',) | |||
|
|||
def __init__(self, axis): |
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.
Why this change? Just remove this commit, or explain why it is needed.
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.
oh! This should have gotten removed from the rebase. It existed before, but i have changed this behaviour in #4570 itself
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.
Yeah, this diff doesn't exist anymore. It has been removed. Earlier, i thought it was better to pass context_name
There are few redundant commits. #128f257 and #3855671 (Did in #4570 but with a different name), #5bbbb31 did as a different PR. Shall I squash them ? |
We will need to the the automatic cache (in Op's metaclass) first, and then go on with the cleaning up. |
Closing as continued in #5579 |
The cleanup of PR #4570. Will rebase with the master once #4570 gets merged.
Tasks :
@lamblin Am i missing anything in the to-do list?