未验证 提交 951010a2 编写于 作者: S sneaxiy 提交者: GitHub

Fix squared_l2_norm wrong stream bug (#45174)

* fix squared_l2_norm bug

* update buffer.h
上级 5e1a20bf
......@@ -50,7 +50,7 @@ class Buffer {
allocation_ && allocation_->size() > 0 ? allocation_->ptr() : nullptr);
}
size_t Size() const { return allocation_ ? 0 : allocation_->size(); }
size_t Size() const { return allocation_ ? allocation_->size() : 0; }
platform::Place GetPlace() const { return place_; }
......
......@@ -82,7 +82,8 @@ void SquaredL2Norm(const phi::GPUContext& ctx,
y,
numel,
cub::Sum(),
static_cast<T2>(0)));
static_cast<T2>(0),
stream));
}
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册