Commit 05c7fbe4 authored by Jayaram Bobba's avatar Jayaram Bobba Committed by Robert Kimball

Jbobba/fix squeeze padded layouts (#2136)

* fix expand layout for padded dimensions

* enable squeeze padded layouts
parent f2038de2
...@@ -565,7 +565,7 @@ memory::desc runtime::cpu::mkldnn_utils::expand_blocked_md(const memory::desc& i ...@@ -565,7 +565,7 @@ memory::desc runtime::cpu::mkldnn_utils::expand_blocked_md(const memory::desc& i
in.data.layout_desc.blocking.strides[0][in.data.ndims - 1]; in.data.layout_desc.blocking.strides[0][in.data.ndims - 1];
size_t nelems = 1; size_t nelems = 1;
for (size_t idx = 0; idx < in.data.ndims; idx++) for (size_t idx = 0; idx < in.data.ndims; idx++)
nelems *= in.data.dims[idx]; nelems *= in.data.layout_desc.blocking.padding_dims[idx];
md.layout_desc.blocking.strides[0][j] = nelems; md.layout_desc.blocking.strides[0][j] = nelems;
} }
} }
......
...@@ -1315,15 +1315,6 @@ namespace ngraph ...@@ -1315,15 +1315,6 @@ namespace ngraph
return false; return false;
} }
if (std::getenv("NGRAPH_CPU_ENABLE_SQUEEZE_PADDED_LAYOUTS") == nullptr)
{
if (mkldnn_utils::is_mkldnn_padded_layout(
md, ngraph::get_default_order(input_shape)))
{
return false;
}
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment