Skip to content

Commit

Permalink
Add missing persistent flat in deserialize_input_spec
Browse files Browse the repository at this point in the history
Summary: ^

Reviewed By: chakriu

Differential Revision: D53713471

fbshipit-source-id: 3419dd6909f8735126c68d3844c847042adcec40
  • Loading branch information
tarun292 authored and facebook-github-bot committed Feb 13, 2024
1 parent 6d54911 commit f95d88f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exir/serde/export_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ def serialize_input_spec(self, spec: ep.InputSpec) -> InputSpec:
elif spec.kind == ep.InputKind.BUFFER:
assert spec.target is not None
assert isinstance(spec.arg, ep.TensorArgument)
assert spec.persistent is not None
return InputSpec.create(
buffer=InputToBufferSpec(
arg=TensorArgument(name=spec.arg.name),
Expand Down Expand Up @@ -1319,6 +1320,7 @@ def deserialize_input_spec(self, i: InputSpec) -> ep.InputSpec:
kind=ep.InputKind.BUFFER,
arg=PyTensorArgument(name=i.buffer.arg.name),
target=i.buffer.buffer_name,
persistent=i.buffer.persistent,
)
elif i.type == "tensor_constant":
return ep.InputSpec(
Expand Down

0 comments on commit f95d88f

Please sign in to comment.