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 pool3dgrad special dim support #51727

Merged
merged 3 commits into from Mar 20, 2023
Merged

add pool3dgrad special dim support #51727

merged 3 commits into from Mar 20, 2023

Conversation

ykkk2333
Copy link
Contributor

@ykkk2333 ykkk2333 commented Mar 16, 2023

PR types

Others

PR changes

OPs

Describe

substitude max pool3d grad xpu for max pool2d grad api when d=1.
fix previous xpu dataloader context map bug.

@ykkk2333 ykkk2333 closed this Mar 16, 2023
@ykkk2333 ykkk2333 reopened this Mar 16, 2023
@@ -197,16 +193,18 @@ struct XPUContext::Impl {
}

void SetXdlCtx(std::string thread_name) {
Copy link
Contributor

Choose a reason for hiding this comment

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

thread_name这个参数没有用了?
现在是怎么判断当前线程是不是dataloader的线程?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已改,线程现在会在每次getcontext的时候判断是否是dataloader,dataloader的context map会以pid为key

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.

是的,会判断当前线程名字是不是dataloader的

if (ctx_t) {
PD_CHECK(ctx_t != nullptr, "the xpu dataloader context is nullptr.");
xpu_wait(ctx_t->xpu_stream);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

这边wait之后可以直接return吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@houj04 houj04 merged commit 4851c64 into PaddlePaddle:develop Mar 20, 2023
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.

None yet

4 participants