Skip to content
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
2 changes: 2 additions & 0 deletions backends/vulkan/_passes/remove_redundant_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class RemoveRedundantOpsTransform(ExportPass):
exir_ops.edge.aten.clone.default,
torch.ops.aten.alias.default,
exir_ops.edge.aten.alias.default,
torch.ops.aten.alias_copy.default,
exir_ops.edge.aten.alias_copy.default,
exir_ops.edge.aten.lift_fresh_copy.default,
exir_ops.edge.dim_order_ops._to_dim_order_copy.default,
exir_ops.edge.dim_order_ops._clone_dim_order.default,
Expand Down
14 changes: 14 additions & 0 deletions backends/vulkan/op_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,20 @@ def register_clone_dim_order():
)


# alias_copy is a no-op identity operation (same as clone/alias). It is removed
# by RemoveRedundantOpsTransform during preprocess, so the C++ runtime never sees
# it. Registering it here ensures the partitioner delegates it to Vulkan rather
# than creating partition boundaries that break the graph.
@update_features(exir_ops.edge.aten.alias_copy.default)
def register_alias_copy():
return OpFeatures(
inputs_storage=utils.ANY_STORAGE,
inputs_dtypes=utils.FP_INT_BOOL_T,
supports_resize=True,
supports_highdim=True,
)


# =============================================================================
# Gather.cpp
# =============================================================================
Expand Down
Loading