Skip to content

Commit 1392f4f

Browse files
ydwu4facebook-github-bot
authored andcommitted
Move executorch_call_delegate to torch.ops.higher_order.executorch_call_delegate (#1149)
Summary: Move torch.ops.executorch_call_delegate to torch.ops.higher_order.executorch_call_delegate. This is to better organize the namespace for all higher order operators. Differential Revision: D51032881
1 parent c0b42d2 commit 1392f4f

19 files changed

+44
-38
lines changed

backends/xnnpack/test/models/inception_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_fp32_ic3(self):
3737
.to_edge()
3838
.check(list(self.all_operators))
3939
.partition()
40-
.check(["torch.ops.executorch_call_delegate"])
40+
.check(["torch.ops.higher_order.executorch_call_delegate"])
4141
.check_not(list(self.all_operators))
4242
.to_executorch()
4343
.serialize()
@@ -58,7 +58,7 @@ def test_qs8_ic3(self):
5858
.to_edge()
5959
.check(list(ops_after_quantization))
6060
.partition()
61-
.check(["torch.ops.executorch_call_delegate"])
61+
.check(["torch.ops.higher_order.executorch_call_delegate"])
6262
.check_not(list(ops_after_quantization))
6363
.to_executorch()
6464
.serialize()

backends/xnnpack/test/models/inception_v4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_fp32_ic4(self):
3535
.to_edge()
3636
.check(list(self.all_operators))
3737
.partition()
38-
.check(["torch.ops.executorch_call_delegate"])
38+
.check(["torch.ops.higher_order.executorch_call_delegate"])
3939
.check_not(list(self.all_operators))
4040
.to_executorch()
4141
.serialize()
@@ -56,7 +56,7 @@ def test_qs8_ic4(self):
5656
.to_edge()
5757
.check(list(ops_after_quantization))
5858
.partition()
59-
.check(["torch.ops.executorch_call_delegate"])
59+
.check(["torch.ops.higher_order.executorch_call_delegate"])
6060
.check_not(list(ops_after_quantization))
6161
.to_executorch()
6262
.serialize()

backends/xnnpack/test/models/mobilenet_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_fp32_mv2(self):
3535
.to_edge()
3636
.check(list(self.all_operators))
3737
.partition()
38-
.check(["torch.ops.executorch_call_delegate"])
38+
.check(["torch.ops.higher_order.executorch_call_delegate"])
3939
.check_not(list(self.all_operators))
4040
.to_executorch()
4141
.serialize()
@@ -56,7 +56,7 @@ def test_qs8_mv2(self):
5656
.to_edge()
5757
.check(list(ops_after_quantization))
5858
.partition()
59-
.check(["torch.ops.executorch_call_delegate"])
59+
.check(["torch.ops.higher_order.executorch_call_delegate"])
6060
.check_not(list(ops_after_quantization))
6161
.to_executorch()
6262
.serialize()

backends/xnnpack/test/models/mobilenet_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_fp32_mv3(self):
3737
.to_edge()
3838
.check(list(self.all_operators))
3939
.partition()
40-
.check(["torch.ops.executorch_call_delegate"])
40+
.check(["torch.ops.higher_order.executorch_call_delegate"])
4141
.check_not(list(self.all_operators))
4242
.to_executorch()
4343
.serialize()
@@ -58,7 +58,7 @@ def test_qs8_mv3(self):
5858
.to_edge()
5959
.check(list(ops_after_quantization))
6060
.partition()
61-
.check(["torch.ops.executorch_call_delegate"])
61+
.check(["torch.ops.higher_order.executorch_call_delegate"])
6262
.check_not(list(ops_after_lowering))
6363
.to_executorch()
6464
.serialize()

backends/xnnpack/test/models/torchvision_vit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_fp32_vit(self):
5353
.to_edge()
5454
.check(list(self.all_operators))
5555
.partition()
56-
.check(["torch.ops.executorch_call_delegate"])
56+
.check(["torch.ops.higher_order.executorch_call_delegate"])
5757
.check_not(list(lowerable_xnn_operators))
5858
.to_executorch()
5959
.serialize()

backends/xnnpack/test/ops/add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_fp32_add(self):
3434
.to_edge()
3535
.check_count({"executorch_exir_dialects_edge__ops_aten_add_Tensor": 4})
3636
.partition()
37-
.check_count({"torch.ops.executorch_call_delegate": 1})
37+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
3838
.check_not(["executorch_exir_dialects_edge__ops_aten_add_Tensor"])
3939
.to_executorch()
4040
.serialize()
@@ -53,7 +53,7 @@ def test_qs8_add(self):
5353
.to_edge()
5454
.check_count({"executorch_exir_dialects_edge__ops_aten_add_Tensor": 4})
5555
.partition(Partition(partitioner=XnnpackQuantizedPartitioner))
56-
.check_count({"torch.ops.executorch_call_delegate": 1})
56+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
5757
.check_not(["executorch_exir_dialects_edge__ops_aten_add_Tensor"])
5858
.check_not(["torch.ops.quantized_decomposed"])
5959
.to_executorch()
@@ -80,7 +80,7 @@ def test_fp32_add_relu(self):
8080
.partition()
8181
.check_not(["executorch_exir_dialects_edge__ops_aten_add_Tensor"])
8282
.check_not(["executorch_exir_dialects_edge__ops_aten_relu_default"])
83-
.check_count({"torch.ops.executorch_call_delegate": 1})
83+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
8484
.to_executorch()
8585
.serialize()
8686
.run_method()
@@ -103,7 +103,7 @@ def test_qs8_add_relu(self):
103103
.check_not(["executorch_exir_dialects_edge__ops_aten_add_Tensor"])
104104
.check_not(["executorch_exir_dialects_edge__ops_aten_relu_default"])
105105
.check_not(["torch.ops.quantized_decomposed"])
106-
.check_count({"torch.ops.executorch_call_delegate": 1})
106+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
107107
.to_executorch()
108108
.serialize()
109109
.run_method()

backends/xnnpack/test/ops/bilinear2d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_fp32_static_resize_bilinear2d(self):
8686
.check(self.ops)
8787
.partition()
8888
.check_not(self.ops)
89-
.check_count({"torch.ops.executorch_call_delegate": 1})
89+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
9090
.to_executorch()
9191
.serialize()
9292
.run_method()
@@ -102,7 +102,7 @@ def test_fp32_static_resize_bilinear2d_with_align_cornesr(self):
102102
.check(self.ops)
103103
.partition()
104104
.check_not(self.ops)
105-
.check_count({"torch.ops.executorch_call_delegate": 1})
105+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
106106
.to_executorch()
107107
.serialize()
108108
.run_method()
@@ -127,5 +127,5 @@ def test_fp32_static_resize_bilinear2d_antialiased(self):
127127
"executorch_exir_dialects_edge__ops_aten__upsample_bilinear2d_aa_default": 2
128128
}
129129
)
130-
.check_not(["torch.ops.executorch_call_delegate"])
130+
.check_not(["torch.ops.higher_order.executorch_call_delegate"])
131131
)

backends/xnnpack/test/ops/cat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_fp32_cat(self):
2727
.to_edge()
2828
.check_count({"executorch_exir_dialects_edge__ops_aten_cat": 1})
2929
.partition()
30-
.check_count({"torch.ops.executorch_call_delegate": 1})
30+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
3131
.check_not(["executorch_exir_dialects_edge__ops_aten_cat"])
3232
.to_executorch()
3333
.serialize()
@@ -51,7 +51,7 @@ def test_fp32_cat_negative_dim(self):
5151
.to_edge()
5252
.check_count({"executorch_exir_dialects_edge__ops_aten_cat": 1})
5353
.partition()
54-
.check_count({"torch.ops.executorch_call_delegate": 1})
54+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
5555
.check_not(["executorch_exir_dialects_edge__ops_aten_cat"])
5656
.to_executorch()
5757
.serialize()

backends/xnnpack/test/ops/conv1d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_conv1d(self):
5050
)
5151
.partition()
5252
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
53-
.check_count({"torch.ops.executorch_call_delegate": 1})
53+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
5454
.to_executorch()
5555
.serialize()
5656
.run_method()

backends/xnnpack/test/ops/conv2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _test(
7676
)
7777
.partition()
7878
.check_not(["executorch_exir_dialects_edge__ops_aten_convolution_default"])
79-
.check_count({"torch.ops.executorch_call_delegate": 1})
79+
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
8080
.to_executorch()
8181
.serialize()
8282
.run_method()

0 commit comments

Comments
 (0)