Skip to content

Commit

Permalink
[onnx] Fix type on create_module() in onnx_importer.py. (llvm#2968)
Browse files Browse the repository at this point in the history
The type returned was changed in
llvm#2795. This led to errors in the
downstream IREE project: iree-org/iree#16622.
  • Loading branch information
ScottTodd authored Feb 29, 2024
1 parent 579ac8b commit e7d90a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/torch_mlir/extras/onnx_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ def __init__(self, model_proto: onnx.ModelProto, *, config: Config = Config()):
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:
Expand Down

0 comments on commit e7d90a4

Please sign in to comment.