未验证 提交 d953f8a9 编写于 作者: C chentianyu03 提交者: GitHub

fix cuda Stream record_event bug (#34285)

上级 32cb0f5a
...@@ -164,8 +164,7 @@ void BindCudaStream(py::module *m_ptr) { ...@@ -164,8 +164,7 @@ void BindCudaStream(py::module *m_ptr) {
[](paddle::platform::stream::CUDAStream &self, [](paddle::platform::stream::CUDAStream &self,
paddle::platform::CudaEvent *event) { paddle::platform::CudaEvent *event) {
if (event == nullptr) { if (event == nullptr) {
auto event_tmp = paddle::platform::CudaEvent(); event = new paddle::platform::CudaEvent();
event = &event_tmp;
} }
event->Record(self); event->Record(self);
return event; return event;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册