Skip to content
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

Change custom_skip_targets meaning for constant_prop_pass #3491

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions exir/passes/constant_prop_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def get_propagated_const_tensor_dict(
# Initialize dict with all constant placeholders.
const_node_to_tensor = get_constant_placeholder_dict(exported_program)

all_skip_targets: set[EdgeOpOverload] = set()
# Default set of targets to skip.
all_skip_targets.update(_DEFAULT_SKIP_TARGETS)
if custom_skip_targets is not None:
all_skip_targets.update(custom_skip_targets)
all_skip_targets = custom_skip_targets
else:
# Default set of targets to skip.
all_skip_targets = _DEFAULT_SKIP_TARGETS

for node in exported_program.graph.nodes:
if node.op != "call_function" or node.target in all_skip_targets:
Expand Down