@@ -230,6 +230,14 @@ def update_features_impl(op: OpKey):
230230 exir_ops .edge .quantized_decomposed .dequantize_per_channel .default ,
231231 # Symbolic integer ops
232232 torch .ops .aten .sym_size .int ,
233+ operator .add ,
234+ operator .lt ,
235+ operator .gt ,
236+ operator .ge ,
237+ operator .le ,
238+ # Guard and assert ops
239+ torch .ops .aten ._assert_scalar .default ,
240+ torch .ops .aten .sym_constrain_range_for_size .default ,
233241 ]
234242)
235243def register_ephemeral_op (features : OpFeatures ):
@@ -500,7 +508,12 @@ def register_sdpa_with_kv_cache_op(features: OpFeatures):
500508 return features
501509
502510
503- @update_features (["llama::update_cache" , "llama::custom_sdpa" ])
511+ @update_features (
512+ [
513+ "llama::update_cache" ,
514+ "llama::custom_sdpa" ,
515+ ]
516+ )
504517def register_sdpa_ops (features : OpFeatures ):
505518 features .resize_fn = False
506519 features .buffer_impl = False
@@ -520,8 +533,17 @@ def register_rotary_emb_op(features: OpFeatures):
520533 return features
521534
522535
523- @update_features (exir_ops .edge .aten .view_copy .default )
524- def register_view_op (features : OpFeatures ):
536+ @update_features (
537+ [
538+ exir_ops .edge .aten .clone .default ,
539+ exir_ops .edge .aten .permute .default ,
540+ exir_ops .edge .aten .permute_copy .default ,
541+ exir_ops .edge .aten .select_copy .int ,
542+ exir_ops .edge .aten .slice_copy .Tensor ,
543+ exir_ops .edge .aten .view_copy .default ,
544+ ]
545+ )
546+ def register_view_ops (features : OpFeatures ):
525547 features .texture_impl = TextureImplFeatures (
526548 valid_packed_dims = all_packed_dims ,
527549 )
@@ -538,10 +560,8 @@ def register_view_op(features: OpFeatures):
538560 # Indexing and lookup
539561 exir_ops .edge .aten .flip .default ,
540562 exir_ops .edge .aten .index_select .default ,
541- exir_ops .edge .aten .select_copy .int ,
542563 # Tensor creation
543564 exir_ops .edge .aten .arange .start_step ,
544- exir_ops .edge .aten .clone .default ,
545565 exir_ops .edge .aten .constant_pad_nd .default ,
546566 exir_ops .edge .aten .full .default ,
547567 exir_ops .edge .aten .full_like .default ,
@@ -564,12 +584,9 @@ def register_ported_op(features: OpFeatures):
564584# Ops ported from PyTorch Vulkan backend. These ops are in a separate registry becasue they support all packed dimensions
565585@update_features (
566586 [
567- # Indexing and lookup
568- exir_ops .edge .aten .slice_copy .Tensor ,
569587 # Shape Manipulation
570588 exir_ops .edge .aten .squeeze_copy .dims ,
571589 exir_ops .edge .aten .unsqueeze_copy .default ,
572- exir_ops .edge .aten .permute_copy .default ,
573590 # Tensor combination
574591 exir_ops .edge .aten .cat .default ,
575592 exir_ops .edge .aten .repeat .default ,
0 commit comments