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

support eager empty blob #4047

Merged
merged 7 commits into from
Dec 28, 2020
Merged

Conversation

ScXfjiang
Copy link
Contributor

No description provided.

@@ -545,6 +545,12 @@ std::shared_ptr<user_op::OpKernelState> EagerKernel::EagerForward(
UserKernelInitContext init_ctx(device_ctx, kernel_conf(), job_desc());
new_opkernel_state = kernel_->CreateOpKernelState(&init_ctx);
}

if (IsAllBlobEmpty(op_attribute().output_bns(), BnInOp2Blob)
Copy link
Contributor

Choose a reason for hiding this comment

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

这个函数只在当前文件使用,可以实现在当前文件的匿名空间里

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个函数经过修改后在kernel.cpp和user_kernel.cpp有使用,分别处理LazyForward和EagerForward。
kernel.cpp: link
if (IsAllBlobEmpty(op_attribute().output_bns(), BnInOp2Blob) && IsStateless()) { return; }
user_kernel.cpp: link
if (IsAllBlobEmpty(op_attribute().output_bns(), BnInOp2Blob)

@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot December 28, 2020 15:33
@oneflow-ci-bot oneflow-ci-bot self-requested a review December 28, 2020 18:15
@oneflow-ci-bot oneflow-ci-bot merged commit f24c226 into master Dec 28, 2020
@oneflow-ci-bot oneflow-ci-bot deleted the dev_support_eager_empty_blob branch December 28, 2020 20:57
liujuncheng pushed a commit that referenced this pull request Jun 3, 2021
* draft

* format

* change location of header file

Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
Former-commit-id: f24c226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants