Skip to content

Commit 8740bed

Browse files
committed
Update on "[ET-VK][ez] Clean up organization of supported_ops"
As title. Group supported ops by features instead of op category. This will make it easier to mark that an op has increased its feature set. This also allows the registration code to be simplified a lot. Differential Revision: [D63913433](https://our.internmc.facebook.com/intern/diff/D63913433/) [ghstack-poisoned]
2 parents fda6fe4 + 23c1e16 commit 8740bed

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

backends/vulkan/partitioner/supported_ops.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ def __contains__(self, op):
4848
]
4949

5050
SUPPORTS_DYNAMIC_SHAPE = [
51-
# Binary broadcasting operators
51+
# Binary broadcasting
5252
exir_ops.edge.aten.add.Tensor,
5353
exir_ops.edge.aten.sub.Tensor,
5454
exir_ops.edge.aten.minimum.default,
5555
exir_ops.edge.aten.mul.Tensor,
5656
exir_ops.edge.aten.div.Tensor,
5757
exir_ops.edge.aten.div.Tensor_mode,
5858
exir_ops.edge.aten.pow.Tensor_Tensor,
59-
# Unary elementwise operators
59+
# Unary elementwise
6060
exir_ops.edge.aten.abs.default,
6161
exir_ops.edge.aten.clamp.default,
6262
exir_ops.edge.aten.cos.default,
@@ -70,46 +70,46 @@ def __contains__(self, op):
7070
exir_ops.edge.aten.sin.default,
7171
exir_ops.edge.aten.sqrt.default,
7272
exir_ops.edge.aten.tanh.default,
73-
# Matrix Multiplication Operators
73+
# Matrix Multiplication
7474
exir_ops.edge.aten.bmm.default,
7575
exir_ops.edge.aten.mm.default,
7676
exir_ops.edge.aten.addmm.default,
7777
exir_ops.edge.aten.linear.default,
78-
# Reduction operators
78+
# Reduction
7979
exir_ops.edge.aten._log_softmax.default,
8080
exir_ops.edge.aten._softmax.default,
81-
# 2D Pooling ops
81+
# 2D Pooling
8282
exir_ops.edge.aten.avg_pool2d.default,
8383
exir_ops.edge.aten.max_pool2d_with_indices.default,
84-
# Convolution ops
84+
# Convolution
8585
exir_ops.edge.aten.convolution.default,
8686
exir_ops.edge.et_vk.conv_with_clamp.default,
8787
]
8888

8989
NO_DYNAMIC_SHAPE = [
90-
# Reduction operators
90+
# Reduction
9191
exir_ops.edge.aten.mean.dim,
9292
exir_ops.edge.aten.sum.dim_IntList,
93-
# Normalization operators
93+
# Normalization
9494
exir_ops.edge.aten._native_batch_norm_legit_no_training.default,
9595
exir_ops.edge.aten.native_layer_norm.default,
96-
# Shape Manipulation operators
96+
# Shape Manipulation
9797
exir_ops.edge.aten.squeeze_copy.dims,
9898
exir_ops.edge.aten.unsqueeze_copy.default,
9999
exir_ops.edge.aten.view_copy.default,
100100
exir_ops.edge.aten.permute_copy.default,
101101
exir_ops.edge.aten.t_copy.default,
102-
# Indexing and lookup operators
102+
# Indexing and lookup
103103
exir_ops.edge.aten.embedding.default,
104104
exir_ops.edge.aten.index_select.default,
105105
exir_ops.edge.aten.select_copy.int,
106106
exir_ops.edge.aten.slice_copy.Tensor,
107-
# Tensor combination operators
107+
# Tensor combination
108108
exir_ops.edge.aten.cat.default,
109109
exir_ops.edge.aten.split_with_sizes_copy.default,
110110
exir_ops.edge.aten.split.Tensor,
111111
exir_ops.edge.aten.repeat.default,
112-
# Tensor creation operators
112+
# Tensor creation
113113
exir_ops.edge.aten.arange.start_step,
114114
exir_ops.edge.aten.clone.default,
115115
exir_ops.edge.aten.constant_pad_nd.default,

0 commit comments

Comments
 (0)