未验证 提交 d1811010 编写于 作者: T Tomasz Socha 提交者: GitHub

Use OneDNN's LayerNorm kernel (#40418)

上级 f70f5e4f
...@@ -150,4 +150,5 @@ class LayerNormMKLDNNOpKernel : public paddle::framework::OpKernel<T> { ...@@ -150,4 +150,5 @@ class LayerNormMKLDNNOpKernel : public paddle::framework::OpKernel<T> {
// TODO(jczaja): Enable FP32 when performance is good // TODO(jczaja): Enable FP32 when performance is good
namespace ops = paddle::operators; namespace ops = paddle::operators;
REGISTER_OP_KERNEL(layer_norm, MKLDNN, ::paddle::platform::CPUPlace, REGISTER_OP_KERNEL(layer_norm, MKLDNN, ::paddle::platform::CPUPlace,
ops::LayerNormMKLDNNOpKernel<float>,
ops::LayerNormMKLDNNOpKernel<paddle::platform::bfloat16>); ops::LayerNormMKLDNNOpKernel<paddle::platform::bfloat16>);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册