init logger

This commit is contained in:
Tianlei Wu 2025-02-01 01:36:14 +00:00
parent 7a73fa986e
commit d7c58ab96e
3 changed files with 17 additions and 4 deletions

View file

@ -0,0 +1,16 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
import pytest
@pytest.fixture(scope="session", autouse=True)
def setup_once():
print("Setup before all tests.")
from kernel_explorer import set_ort_severity
set_ort_severity(3)
yield
print("Teardown after all tests.")

View file

@ -365,6 +365,3 @@ def set_dispatchable_pattern(p: str = "*"):
def set_return_tuning_results(b: bool = True):
_ke_context.return_tuning_results = b
# set default logger severity once so that we can create the defautl logger.
set_ort_severity(3)

View file

@ -189,7 +189,7 @@ jobs:
set -ex; \
env; \
cd /onnxruntime_src/onnxruntime/python/tools/kernel_explorer/kernels; \
pytest -n 4 --reruns 1 --durations=100"
pytest -s -n 4 --reruns 1 --durations=100"
workingDirectory: $(Build.SourcesDirectory)
displayName: 'Run kernel explorer tests'
condition: succeededOrFailed()