Skip to content

Commit

Permalink
Merge pull request #520 from Xilinx/bump_to_a99e3780
Browse files Browse the repository at this point in the history
[AutoBump] Merge with a99e378 (Dec 09) (130)
  • Loading branch information
mgehre-amd authored Feb 10, 2025
2 parents 6eb87b1 + f72f27e commit b508995
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/torch_mlir/extras/onnx_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,10 @@ def type_proto_to_type(self, tp: onnx.TypeProto) -> IrType:
def _sanitize_name(self, name):
if not name.isidentifier():
name = "_" + name
return re.sub("[:/]", "_", name)

# Remove characters that are invalid in MLIR identifier names.
# https://mlir.llvm.org/docs/LangRef/#identifiers-and-keywords
return re.sub("[:/-]", "_", name)

def tensor_proto_to_attr(self, tp: onnx.TensorProto) -> Attribute:
tensor_type = self.tensor_proto_to_builtin_type(tp)
Expand Down

0 comments on commit b508995

Please sign in to comment.