Skip to content

Commit b12e5af

Browse files
committed
Update on "Add pass to tag external constants for delegates"
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
1 parent 3d512c9 commit b12e5af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backends/xnnpack/operators/node_visitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ def get_serialized_buffer_index(
594594
)
595595

596596
external_tag = None
597-
if tensor.meta.get("delegate_constant_tag", None) is not None:
598-
external_tag = tensor.meta["delegate_constant_tag"]
597+
if tensor.meta.get("xnnpack_constant_tag", None) is not None:
598+
external_tag = tensor.meta["xnnpack_constant_tag"]
599599
self._named_data_store.add_named_data(
600600
named_key,
601601
bytes(array),

exir/passes/external_constants_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ def xnnpack_external_constants_pass(
100100
if node.op == "placeholder":
101101
# Move specified constants to external file. If none, move all constants.
102102
if names is None or node.name in names:
103-
node.meta["delegate_constant_tag"] = "_default_external_constant"
103+
node.meta["xnnpack_constant_tag"] = "_default_external_constant"
104104
mutated = True
105105
return PassResult(gm, mutated)

0 commit comments

Comments
 (0)