mirror of https://github.com/llvm/torch-mlir
[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
parent
579ac8b666
commit
e7d90a4b82
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue