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

Add Support for OperatorBase in new executor #36945

Merged
merged 9 commits into from
Nov 8, 2021

Conversation

2742195759
Copy link
Contributor

@2742195759 2742195759 commented Nov 2, 2021

PR types

Others

PR changes

Others

Describe

Add Support for OperatorBase in new executor.

@paddle-bot-old
Copy link

paddle-bot-old bot commented Nov 2, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

if (op_with_kernel == nullptr)
instr_node.OpBase()->Run(*global_scope_->GetScope(), place_);
else
instr_node.KernelFunc()(*instr_node.InnerExecutionContext().get());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下个PR,这里的KernelFunc可以抽象为一个单独的类,里面处理OperatorBase和OperatorWithKernel 的分支,对外只暴露Run接口

// ScopeBase.
// Scope manager the variables and VariableScope is just a
// quick
// access machanism.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下个PR,考虑是把ScopeBase去掉,或者有个单独的子类继承ScopeBase,然后VariableScope持有这个子类对象?

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aurelius84 Aurelius84 merged commit 251f68e into PaddlePaddle:develop Nov 8, 2021
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.

2 participants