fix: "UserWarning: Unsupported Windows version (11). ONNX Runtime sup… (#19845)

fix: "UserWarning: Unsupported Windows version (11). ONNX Runtime
supports Windows 10 and above, only."

### Description

Include Windows 11 in the version check. Now, you will not see the
warning “Unsupported Windows version (11). ONNX Runtime supports Windows
10 and above, only.”

### Motivation and Context

Warning on Windows 11: Only supports systems above Windows 10, which is
somewhat strange.
This commit is contained in:
enximi 2024-03-16 03:41:44 +08:00 committed by GitHub
parent 79e50aeef3
commit 7b46b31558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ def check_distro_info():
__my_distro__ = __my_system__
__my_distro_ver__ = platform.release().lower()
if __my_distro_ver__ != "10":
if __my_distro_ver__ not in ["10", "11"]:
warnings.warn(
"Unsupported Windows version (%s). ONNX Runtime supports Windows 10 and above, only."
% __my_distro_ver__