dmilosevic252 opened a new pull request, #16210: URL: https://github.com/apache/tvm/pull/16210
Fixes the issue in ONNX test_forward.py. The function is_greater_than produces wrong results for certain values. The difference between old and new version is illustrated below. ` import re def old_is_version_greater_than(ver1, ver2): return "".join(re.findall(r"(\d+\.)(\d+\.)(\d)", ver1)[0]) > "".join( re.findall(r"(\d+\.)(\d+\.)(\d)", ver2)[0] ) def new_is_version_greater_than(ver1, ver2): return tuple(map(int, re.match(r"(\d+)\.(\d+)\.(\d+)", ver1).groups())) > tuple( map(int, re.match(r"(\d+)\.(\d+)\.(\d+)", ver2).groups()) ) ver1 = "1.12.0" ver2 = "1.7.0" #ver1 is greater than ver2 print(old_is_version_greater_than(ver1,ver2)) #False print(new_is_version_greater_than(ver1,ver2)) #True ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org