未验证 提交 a9c497cd 编写于 作者: FormlessUnit's avatar FormlessUnit 提交者: GitHub

fix dy_to_static (#56592)

上级 c9a4d8ca
......@@ -1458,7 +1458,7 @@ void FusedBiasActInferMeta(const MetaTensor& x,
auto token_num = x_dims[0];
auto dim = x_dims[1];
if (!config.is_runtime) {
if (config.is_runtime) {
PADDLE_ENFORCE_GT(
x_dims[0],
0,
......
......@@ -109,9 +109,10 @@ def weight_only_linear(
inputs = {
'x': [x],
'weight': [weight],
'bias': [bias],
'weight_scale': [weight_scale],
}
if bias:
inputs["bias"] = [bias]
attrs = {'weight_dtype': weight_dtype}
out = helper.create_variable_for_type_inference(dtype)
......@@ -173,9 +174,10 @@ def llm_int8_linear(
inputs = {
'x': [x],
'weight': [weight],
'bias': [bias],
'weight_scale': [weight_scale],
}
if bias:
inputs["bias"] = [bias]
attrs = {'threshold': threshold}
out = helper.create_variable_for_type_inference(dtype)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册