未验证 提交 a4b4343f 编写于 作者: Z zyfncg 提交者: GitHub

Fix test_conv_bn_fuse_pass_cc on Windows System (#49446)

* fix test_conv_bn_fuse_pass_cc

* remove comment
上级 6e5917e4
...@@ -32,7 +32,11 @@ void AddVarToScope(Scope* param_scope, ...@@ -32,7 +32,11 @@ void AddVarToScope(Scope* param_scope,
const DDim& dims) { const DDim& dims) {
auto* tensor = param_scope->Var(name)->GetMutable<phi::DenseTensor>(); auto* tensor = param_scope->Var(name)->GetMutable<phi::DenseTensor>();
tensor->Resize(dims); tensor->Resize(dims);
tensor->mutable_data<float>(platform::CPUPlace()); auto* data = tensor->mutable_data<float>(platform::CPUPlace());
int64_t numel = tensor->numel();
for (int64_t i = 0; i < numel; ++i) {
data[i] = 0;
}
} }
Scope* CreateParamScope() { Scope* CreateParamScope() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册