Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Force Gelu decompose on CPU (#3902)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurides authored and diyessi committed Nov 21, 2019
1 parent bcd1f46 commit f854fd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/ngraph/runtime/cpu/cpu_external_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,8 @@ void runtime::cpu::CPU_ExternalFunction::register_common_passes(
else if (typeid(ngraph::op::GeluBackpropFactor) == typeid(node))
{
#if MKLDNN_VERSION_MAJOR < 1
return ((node.input(0).get_element_type() == element::f32) ? true : false);
// TODO: (gauri): need to differentiate which implementation : erf vs tanh
return false;
#else
// TODO: will be supported in mkldnn v1.1
return false;
Expand All @@ -1219,7 +1220,8 @@ void runtime::cpu::CPU_ExternalFunction::register_common_passes(
else if (typeid(ngraph::op::Gelu) == typeid(node))
{
#if MKLDNN_VERSION_MAJOR < 1
return ((node.input(0).get_element_type() == element::f32) ? true : false);
// TODO: (gauri): need to differentiate which implementation : erf vs tanh
return false;
#else
// TODO: will be supported in mkldnn v1.1
return false;
Expand Down
4 changes: 0 additions & 4 deletions src/ngraph/runtime/cpu/unit_test.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,5 @@ lrn_across_nw
lrn_across_empty
lrn_6D_across_2_axes

# Gelu tests not supported in CPU backend, we use mkldnn gelubackprop (and not factor)
gelu_backprop_factor_f32
backwards_gelu_f32

# ONNX TopK with dynamic K
top_k_opset_10

0 comments on commit f854fd6

Please sign in to comment.