From 34501a1505ad892eaa289b9194c1ff7a7927add0 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Thu, 6 Feb 2025 20:14:13 -0800 Subject: [PATCH] update emitter default evalue to have dim order match size Summary: Its rare for an emitted tensor to be default but it can happen with placeholders. When it happens we need to serialize dim order too since we check that its == in length to size at deserialization. Differential Revision: D69211447 --- exir/emit/_emitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exir/emit/_emitter.py b/exir/emit/_emitter.py index 562ed145699..4082086a40e 100644 --- a/exir/emit/_emitter.py +++ b/exir/emit/_emitter.py @@ -1189,7 +1189,7 @@ def _get_empty_tensor_evalue() -> EValue: # The runtime currently only supports tensors with offset 0. storage_offset=0, sizes=[0], - dim_order=[], + dim_order=[0], requires_grad=False, layout=0, data_buffer_idx=0,