[onnx] Fix type on create_module() in onnx_importer.py. (#2968)

The type returned was changed in
https://github.com/llvm/torch-mlir/pull/2795. This led to errors in the
downstream IREE project: https://github.com/openxla/iree/pull/16622.
pull/2741/head
Scott Todd 2024-02-29 13:01:13 -08:00 committed by GitHub
parent 579ac8b666
commit e7d90a4b82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -99,12 +99,12 @@ class ModelInfo:
assert model_proto.graph, "Model must contain a main Graph"
self.main_graph = GraphInfo(self, model_proto.graph)
def create_module(self, context: Optional[Context] = None) -> Operation:
def create_module(self, context: Optional[Context] = None) -> Module:
if not context:
context = Context()
module_op = Module.create(Location.unknown(context))
module = Module.create(Location.unknown(context))
# TODO: Populate module level metadata from the ModelProto
return module_op
return module
class GraphInfo: