mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-09 00:30:53 +00:00
add pytest.ini for kernel explorer
This commit is contained in:
parent
b36b91b4c8
commit
93d73bf831
3 changed files with 15 additions and 6 deletions
|
|
@ -26,8 +26,8 @@ if build_dir is None:
|
|||
if not os.path.exists(build_dir):
|
||||
raise ValueError(f"KERNEL_EXPLORER_BUILD_DIR ({build_dir}) points to nonexistent path")
|
||||
|
||||
# onnxruntime_pybind11_state and kernel_explorer
|
||||
sys.path.insert(0, build_dir)
|
||||
# add path for onnxruntime_pybind11_state
|
||||
sys.path.insert(0, os.path.join(build_dir, "onnxruntime", "capi"))
|
||||
|
||||
# pylint: disable=wrong-import-position
|
||||
import onnxruntime_pybind11_state # noqa: E402
|
||||
|
|
|
|||
11
onnxruntime/python/tools/kernel_explorer/kernels/pytest.ini
Normal file
11
onnxruntime/python/tools/kernel_explorer/kernels/pytest.ini
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[pytest]
|
||||
|
||||
# Add default command-line options
|
||||
addopts = --maxfail=3 -v
|
||||
|
||||
# Add the current directory to the beginning of sys.path for the duration of the test session.
|
||||
pythonpath = .
|
||||
|
||||
# Enables logging to the console during test runs
|
||||
log_cli = true
|
||||
log_level = INFO
|
||||
|
|
@ -177,7 +177,6 @@ jobs:
|
|||
--user $UID:$(id -g $USER) \
|
||||
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
||||
--volume $(Build.BinariesDirectory):/build \
|
||||
--workdir /build/Release \
|
||||
-e OPENBLAS_NUM_THREADS=1 \
|
||||
-e OPENMP_NUM_THREADS=1 \
|
||||
-e MKL_NUM_THREADS=1 \
|
||||
|
|
@ -189,9 +188,8 @@ jobs:
|
|||
/bin/bash -c "
|
||||
set -ex; \
|
||||
env; \
|
||||
cd /build/Release; \
|
||||
python --version; \
|
||||
pytest /onnxruntime_src/onnxruntime/python/tools/kernel_explorer/ -n 4 --reruns 1 --durations=100"
|
||||
cd /onnxruntime_src/onnxruntime/python/tools/kernel_explorer/kernels; \
|
||||
pytest -n 4 --reruns 1 --durations=100"
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
displayName: 'Run kernel explorer tests'
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
|||
Loading…
Reference in a new issue