Skip to content

Commit 44c0b5a

Browse files
committed
Update base for Update on "[ET Device Support] Propagate device info from TensorSpec into serialized Tensor"
Propagate device information from `TensorSpec.device` (set by `PropagateDevicePass`) to the serialized `schema.Tensor` in the emitted PTE file, to make runtime further aware of it. Differential Revision: [D95899706](https://our.internmc.facebook.com/intern/diff/D95899706/) [ghstack-poisoned]
1 parent 46fd990 commit 44c0b5a

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)