You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm trying to deploy a GNN built with PyG on edge devices (mobile), and I'd like it to be supported with ExecuTorch.
Alternatives
No response
Additional context
Hi! I'm trying to deploy a GNN built with PyG (following this blog) on edge devices (mobile), and I've been exploring ExecuTorch.
However, it seems that PyG can't even be lowered to aten. And I suspect it has something to do with TorchDynamo not supporting the pyg.data.Data structure. This is because when I tried to export to ONNX using dynamo, I saw similar errors.
I attached the full code and full error messages at the end:
aten_dialect=export(simulator, example_inputs) # Error occurred on this line
graph=pyg.data.Data(...) # Error occurred on this line in the user code
I'm using PyTorch==2.5.0, PyG==2.6.1, torch_scatter=2.1.2
PyTorch has version 2.5.0+cu124 with cuda 12.4
/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/onnxscript/converter.py:820: FutureWarning: 'onnxscript.values.Op.param_schemas' is deprecated in version 0.1 and will be removed in the future. Please use '.op_signature' instea
d. param_schemas = callee.param_schemas()
/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/onnxscript/converter.py:820: FutureWarning: 'onnxscript.values.OnnxFunction.param_schemas' is deprecated in version 0.1 and will be removed in the future. Please use '.op_signatu
re' instead. param_schemas = callee.param_schemas()
Traceback (most recent call last):
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/export_gnn_executorch.py", line 227, in <module>
aten_dialect = export(simulator, example_inputs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/__init__.py", line 270, in export
return _export(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 1017, in wrapper
raise e
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 990, in wrapper
ep = fn(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/exported_program.py", line 114, in wrapper
return fn(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 1880, in _export
export_artifact = export_func( # type: ignore[operator]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 1224, in _strict_export
return _strict_export_lower_to_aten_ir(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 1252, in _strict_export_lower_to_aten_ir
gm_torch_level = _export_to_torch_ir(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/export/_trace.py", line 560, in _export_to_torch_ir
gm_torch_level, _ = torch._dynamo.export(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1432, in inner
result_traced = opt_f(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 465, in _fn
return fn(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1269, in __call__
return self._torchdynamo_orig_callable(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 526, in __call__
return _compile(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 924, in _compile
guarded_code = compile_inner(code, one_graph, hooks, transform)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 666, in compile_inner
return _compile_inner(code, one_graph, hooks, transform)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_utils_internal.py", line 87, in wrapper_function
return function(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 699, in _compile_inner
out_code = transform_code_object(code, transform)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1322, in transform_code_object
transformations(instructions, code_options)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 219, in _fn
return fn(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 634, in transform
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2796, in run
super().run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1602, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/nn_module.py", line 442, in call_function
return tx.inline_user_function_return(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1680, in CALL_FUNCTION_EX
self.call_function(fn, argsvars.items, kwargsvars)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 385, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 324, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1602, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 324, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1692, in CALL_FUNCTION_KW
self.call_function(fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/user_defined.py", line 496, in call_function
var.call_method(tx, "__init__", args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/user_defined.py", line 788, in call_method
return UserMethodVariable(method, self, source=source).call_function(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 385, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 324, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1692, in CALL_FUNCTION_KW
self.call_function(fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 1024, in call_function
return self.obj.call_method(tx, self.name, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 195, in call_method
).call_function(tx, [self.objvar] + args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 324, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1602, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 830, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 1024, in call_function
return self.obj.call_method(tx, self.name, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 195, in call_method
).call_function(tx, [self.objvar] + args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 324, in call_function
return super().call_function(tx, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 836, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3011, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3139, in inline_call_
tracer.run()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 983, in run
while self.step():
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 895, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 582, in wrapper
return inner_fn(self, inst)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1803, in STORE_SUBSCR
result = obj.call_method(self, "__setitem__", [key, val], {})
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 1082, in call_method
return super().call_method(tx, name, args, kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/variables/base.py", line 343, in call_method
unimplemented(f"call_method {self} {name} {args} {kwargs}")
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/_dynamo/exc.py", line 297, in unimplemented
raise Unsupported(msg, case_name=case_name)
torch._dynamo.exc.Unsupported: call_method GetAttrVariable(UserDefinedObjectVariable(Data), __dict__) __setitem__ [ConstantVariable(), UserDefinedClassVariable()] {}
from user code:
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/export_gnn_executorch.py", line 185, in forward
data = self.build_graph(particle_type, position_sequence)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/export_gnn_executorch.py", line 108, in forward
graph = preprocess(particle_type, position_sequence, self.metadata)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/export_gnn_executorch.py", line 90, in preprocess
graph = pyg.data.Data(
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch_geometric/data/data.py", line 530, in __init__
super().__init__(tensor_attr_cls=DataTensorAttr)
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch_geometric/data/feature_store.py", line 278, in __init__
super().__init__()
File "/home/sicli01/Projects/FluidML/gnn-physics-pytorch/gnn_env/lib/python3.10/site-packages/torch_geometric/data/graph_store.py", line 111, in __init__
self.__dict__['_edge_attr_cls'] = edge_attr_cls or EdgeAttr
Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
🚀 The feature, motivation and pitch
Hi! I'm trying to deploy a GNN built with PyG on edge devices (mobile), and I'd like it to be supported with ExecuTorch.
Alternatives
No response
Additional context
Hi! I'm trying to deploy a GNN built with PyG (following this blog) on edge devices (mobile), and I've been exploring ExecuTorch.
However, it seems that PyG can't even be lowered to aten. And I suspect it has something to do with TorchDynamo not supporting the pyg.data.Data structure. This is because when I tried to export to ONNX using dynamo, I saw similar errors.
I attached the full code and full error messages at the end:
I'm using PyTorch==2.5.0, PyG==2.6.1, torch_scatter=2.1.2
export_gnn_executorch.py.txt:
export_gnn_executorch_error.txt:
export_gnn_executorch_error_detailed.txt:
@akihironitta
The text was updated successfully, but these errors were encountered: