-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[XPU] fix matmul_broadcast_bugs #66485
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
[XPU] fix matmul_broadcast_bugs #66485
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -590,7 +592,6 @@ static void MatMulXPUFunction( | |||
const XPUType* x_data = reinterpret_cast<const XPUType*>(x); | |||
if (is_x_need_broadcast) { | |||
XPUType* x_broadcast_data = nullptr; | |||
xpu::ctx_guard RAII_GUARD(xpu_ctx); | |||
x_broadcast_data = RAII_GUARD.alloc_l3_or_gm<XPUType>(batch_size * m * k); |
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.
这里在if里创建RAII_GUARD会导致x_broadcast_data在if block退出的时候被释放,后续如果存在多Stream或者FC里申请了临时显存可能踩到。
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.
LGTM
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.
LGTM
* [XPU] fix matmul_broadcast_bugs * fix more bugs
* [XPU] fix matmul_broadcast_bugs * fix more bugs
PR Category
Custom Device
PR Types
Bug fixes
Description