Skip to content

Back out "Tests failing for exp op in xnnpack" #11525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backends/xnnpack/operators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
op_dynamic_dequantize_ops,
op_dynamic_quantize_ops,
op_elu,
op_exp,
op_floor,
op_gelu,
op_hardswish,
Expand Down
52 changes: 0 additions & 52 deletions backends/xnnpack/operators/op_exp.py

This file was deleted.

4 changes: 1 addition & 3 deletions backends/xnnpack/partition/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
ConstantPadConfig,
DeQuantizedPerTensorConfig,
DivConfig,
# EluConfig,
# ExpConfig, # Bug in XNNPACK with exp op
FloorConfig,
GeluConfig,
HardswishConfig,
# EluConfig,
HardtanhConfig,
LeakyReLUConfig,
LogConfig,
Expand Down Expand Up @@ -81,7 +80,6 @@
ClampConfig,
DivConfig,
# EluConfig, # Waiting for PyTorch Pin Update
# ExpConfig, # Bug in XNNPACK with exp op
FloorConfig,
GeluConfig,
HardtanhConfig,
Expand Down
7 changes: 0 additions & 7 deletions backends/xnnpack/partition/config/generic_node_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,6 @@ def get_original_aten(self) -> Optional[torch._ops.OpOverload]:
return torch.ops.aten.upsample_bilinear2d.vec


class ExpConfig(GenericNodePartitionerConfig):
target_name = "exp.default"

def supported_precision_types(self) -> List[ConfigPrecisionType]:
return [ConfigPrecisionType.FP32]


class FloorConfig(GenericNodePartitionerConfig):
target_name = "floor.default"

Expand Down
1 change: 0 additions & 1 deletion backends/xnnpack/partition/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
exir_ops.edge.aten.sigmoid.default,
exir_ops.edge.aten._softmax.default,
exir_ops.edge.aten.cat.default,
# exir_ops.edge.aten.exp.default, # Bug in XNNPACK with exp op
exir_ops.edge.aten.elu.default,
exir_ops.edge.aten.avg_pool2d.default,
exir_ops.edge.aten.leaky_relu.default,
Expand Down
31 changes: 0 additions & 31 deletions backends/xnnpack/runtime/XNNCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1761,36 +1761,6 @@ Error defineELUNode(
return Error::Ok;
}

/*
Define serialized exp node into the subgraph, using the remapped ids
to map the serialized ids, to the new ids generated when defining the
tensor value
*/
Error defineExpNode(
xnn_subgraph_t subgraph_ptr,
const std::unordered_map<uint32_t, uint32_t>& remapped_ids,
const NodePtr node,
const fb_xnnpack::XNNGraph* graph) noexcept {
MAYBE_UNUSED(graph);

auto graph_node = node->xnode_union_as_XNNExp();

xnn_status status = xnn_define_exp(
subgraph_ptr,
remapped_ids.at(graph_node->input_id()),
remapped_ids.at(graph_node->output_id()),
graph_node->flags());

ET_CHECK_OR_RETURN_ERROR(
status == xnn_status_success,
Internal,
"Failed to create exp node %i with code: %s",
node->debug_handle(),
xnn_status_to_string(status));

return Error::Ok;
}

/*
Defines absolute value node into subgraph using the remapped ids to map the
serialized ids to the new ids generated when defining the tensor value
Expand Down Expand Up @@ -2151,7 +2121,6 @@ DefineNodeFunc getDefineNodeFunc(fb_xnnpack::XNodeUnion nodeType) {
_DEFINE(Negate)
_DEFINE(Square)
_DEFINE(ELU)
_DEFINE(Exp)
_DEFINE(Abs)
_DEFINE(PReLU)
_DEFINE(Concatenate2)
Expand Down
1 change: 0 additions & 1 deletion backends/xnnpack/serialization/runtime_schema.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ union XNodeUnion {
XNNNegate: _XNNNode1x1,
XNNSquare: _XNNNode1x1,
XNNELU,
XNNExp: _XNNNode1x1,
XNNAbs: _XNNNode1x1,
XNNPReLU: _XNNNode2x1,
XNNConcatenate2: _XNNCat,
Expand Down
1 change: 0 additions & 1 deletion backends/xnnpack/serialization/schema.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ union XNodeUnion {
XNNNegate: _XNNNode1x1,
XNNSquare: _XNNNode1x1,
XNNELU,
XNNExp: _XNNNode1x1,
XNNAbs: _XNNNode1x1,
XNNPReLU: _XNNNode2x1,
XNNConcatenate2: _XNNCat,
Expand Down
5 changes: 0 additions & 5 deletions backends/xnnpack/serialization/xnnpack_graph_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,6 @@ class XNNCeiling(XNNNode1x1):
pass


@dataclass
class XNNExp(XNNNode1x1):
pass


@dataclass
class XNNGelu(XNNNode1x1):
pass
Expand Down
45 changes: 0 additions & 45 deletions backends/xnnpack/test/ops/test_exp.py

This file was deleted.

Loading