Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update output for quantized models by ORT on VNNI machine #572

Merged
merged 6 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
detect vnni
Signed-off-by: jcwchen <jacky82226@gmail.com>
  • Loading branch information
jcwchen committed Nov 8, 2022
commit 11f2e3cd75b366befe54d560a1738f5b7cc72e16
8 changes: 4 additions & 4 deletions workflow_scripts/check_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import test_utils


def has_avx512f_support():
return "avx512f" in set(get_cpu_info()["flags"])
def has_vnni_support():
return "avx512vnni" in set(get_cpu_info()["flags"])


def run_onnx_checker(model_path):
Expand All @@ -20,8 +20,8 @@ def run_onnx_checker(model_path):


def ort_skip_reason(model_path):
if ("-int8" in model_path or "-qdq" in model_path) and not has_avx512f_support():
return f"Skip ORT test for {model_path} because this machine lacks avx512f support and the output.pb was produced with avx512f support."
if ("-int8" in model_path or "-qdq" in model_path) and not has_vnni_support():
return f"Skip ORT test for {model_path} because this machine lacks avx512vnni support and the output.pb was produced with avx512vnni support."
model = onnx.load(model_path)
if model.opset_import[0].version < 7:
return f"Skip ORT test for {model_path} because ORT only supports opset version >= 7"
Expand Down