-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[phi decoupling] move sequence_padding from fluid to phi #50639
[phi decoupling] move sequence_padding from fluid to phi #50639
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -193,16 +191,16 @@ class UnpaddingLoDTensorFunctor<phi::CPUContext, T> { | |||
|
|||
#ifdef PADDLE_WITH_XPU | |||
template <typename T> | |||
class UnpaddingLoDTensorFunctor<platform::XPUDeviceContext, T> { | |||
class UnpaddingLoDTensorFunctor<paddle::platform::XPUDeviceContext, T> { |
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.
XPUDeviceContext替换成phi下的XPUContext
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.
已处理
@@ -32,63 +34,62 @@ void TestSequencePadding(const DeviceContext &context, | |||
static_cast<int64_t>(sequence_width)}); | |||
|
|||
cpu_seq.set_lod(lod); | |||
cpu_seq.mutable_data<T>(seq_dims, paddle::platform::CPUPlace()); | |||
auto *dev_ctx = static_cast<phi::CPUContext *>( | |||
paddle::platform::DeviceContextPool::Instance().Get(phi::CPUPlace())); |
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.
这里不需要使用从全局单例里拿对象,可以试试参数传入的context行不行
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.
这个改成参数传入的 context 之后 CI-Windows 上的 sequence_padding 单测没办通过,我也不太清楚原因:cry:
8149f88
to
977527d
Compare
PR types
Others
PR changes
Others
Describe