未验证 提交 5a9d2d21 编写于 作者: S Sławomir Siwek 提交者: GitHub

Remove legacy parameter (#42418)

* remove stats_md

* add entry to authors.md
上级 28375ca4
......@@ -57,6 +57,7 @@
| reyoung | Yang Yu |
| [Sand3r-](https://raw.githubusercontent.com/jczaja/Paddle/paddle-poland-team/doc/images/paddle_poland_team.jpg)| Michal Gallus |
| [sfraczek](https://raw.githubusercontent.com/jakpiase/Paddle/new_paddle_intel_authors/img/img.jpg)| Sylwester Fraczek |
| Silv3S | Slawomir Siwek |
| sneaxiy | Jin-Le Zeng |
| Superjom | Chun-Wei Yan |
| tensor-tang | Jian Tang |
......
......@@ -29,18 +29,10 @@ class LayerNormMKLDNNHandler : public platform::MKLDNNHandlerNoCachingT<
const dnnl::engine engine, platform::Place cpu_place)
: platform::MKLDNNHandlerNoCachingT<T, dnnl::layer_normalization_forward>(
engine, cpu_place) {
if (!is_test) {
// TODO(grygielski) Delete forcing stats_md after DNNL 1.2 is introduced
auto stats_md = dnnl::memory::desc(
{begin(dims), end(dims) - 1}, platform::MKLDNNGetDataType<float>(),
platform::GetPlainMKLDNNFormat(dims.size() - 1));
this->AcquireForwardPrimitiveDescriptor(dnnl::prop_kind::forward_training,
x->mem_desc(), stats_md, epsilon,
flags);
} else {
this->AcquireForwardPrimitiveDescriptor(
dnnl::prop_kind::forward_inference, x->mem_desc(), epsilon, flags);
}
const auto fwd_prop_kind = is_test ? dnnl::prop_kind::forward_inference
: dnnl::prop_kind::forward_training;
this->AcquireForwardPrimitiveDescriptor(fwd_prop_kind, x->mem_desc(),
epsilon, flags);
}
std::shared_ptr<dnnl::memory> AcquireScaleShiftMemory(const Tensor* scale,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册