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
Conversation
@@ -197,16 +193,18 @@ struct XPUContext::Impl { | |||
} | |||
|
|||
void SetXdlCtx(std::string thread_name) { |
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.
thread_name这个参数没有用了?
现在是怎么判断当前线程是不是dataloader的线程?
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.
已改,线程现在会在每次getcontext的时候判断是否是dataloader,dataloader的context map会以pid为key
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.
还是根据名字判断?
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.
是的,会判断当前线程名字是不是dataloader的
if (ctx_t) { | ||
PD_CHECK(ctx_t != nullptr, "the xpu dataloader context is nullptr."); | ||
xpu_wait(ctx_t->xpu_stream); | ||
} |
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.
这边wait之后可以直接return吗?
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.
fix
…port, test=kunlun
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.