未验证 提交 5ab07e04 编写于 作者: H HongyuJia 提交者: GitHub

[Unittest Stream] Fix unittest, change raw_stream->GetStream() (#52810)

上级 16c36465
...@@ -199,7 +199,7 @@ std::vector<paddle::Tensor> StreamForward(const paddle::Tensor& x) { ...@@ -199,7 +199,7 @@ std::vector<paddle::Tensor> StreamForward(const paddle::Tensor& x) {
auto dev_ctx = auto dev_ctx =
paddle::experimental::DeviceContextPool::Instance().Get(x.place()); paddle::experimental::DeviceContextPool::Instance().Get(x.place());
auto custom_ctx = static_cast<const phi::CustomContext*>(dev_ctx); auto custom_ctx = static_cast<const phi::CustomContext*>(dev_ctx);
void* stream = custom_ctx->stream(); std::shared_ptr<phi::stream::Stream> stream = custom_ctx->GetStream();
PD_CHECK(stream != nullptr); PD_CHECK(stream != nullptr);
std::cout << "Check stream != nullptr successfully" << std::endl; std::cout << "Check stream != nullptr successfully" << std::endl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册