Skip to content

Commit fd3ae83

Browse files
committed
Update base for Update on "[ET Device Support] Parse device info from serialized tensor in tensor_parser"
Parse device info (device_type, device_index) from the serialized ExtraTensorInfo in .pte files into TensorImpl at runtime. When a tensor's extra_tensor_info contains device annotations (e.g., CUDA), the tensor parser now reads and propagates them to the TensorImpl constructor. Tensors without extra_tensor_info default to CPU/0 for backward compatibility with older PTE files.、 Differential Revision: [D97199497](https://our.internmc.facebook.com/intern/diff/D97199497/) [ghstack-poisoned]
1 parent 1af073f commit fd3ae83

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

exir/passes/propagate_device_pass.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
144144
if node.op == "call_function" and node.target == executorch_call_delegate:
145145
lowered_module = _get_lowered_module(graph_module, node)
146146
if lowered_module is None:
147-
continue
147+
raise RuntimeError(
148+
f"executorch_call_delegate node '{node.name}' does not reference "
149+
"a valid LoweredBackendModule. The first argument must be a "
150+
"get_attr node pointing to a LoweredBackendModule attribute."
151+
)
148152

149153
result = _get_target_device_from_compile_specs(lowered_module)
150154
if result is None:

0 commit comments

Comments
 (0)