mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
[ROCm] use pytest-xdist for fast pytest (#14261)
### Description Use pytest-xdist to distribute tests across multiple CPUs to speed up test execution. Use pytest-rerunfailures to rerun failed test in case of pytest-xdist crash. `pytest -n 16` can reduce pytest time from 80 minutes to 20 minutes. ### Motivation and Context Now kernel explorer pytest of ROCm CI takes nearly 1 hour 20 minutes. It will take longer time when we add more tunableOp in the future.
This commit is contained in:
parent
9bd9206928
commit
d3a09cf77f
2 changed files with 4 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ jobs:
|
|||
inputs:
|
||||
script: |-
|
||||
export KERNEL_EXPLORER_BUILD_DIR=./build/Release
|
||||
pytest ./onnxruntime/python/tools/kernel_explorer/
|
||||
pytest ./onnxruntime/python/tools/kernel_explorer/ -n 16 --reruns 1
|
||||
displayName: 'Run kernel explorer tests'
|
||||
condition: and(succeededOrFailed(), eq(variables.onnxruntimeBuildSucceeded, 'true'))
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ RUN pip install \
|
|||
sentencepiece \
|
||||
dill==0.3.4 \
|
||||
wget \
|
||||
pytorch_lightning==1.6.0
|
||||
pytorch_lightning==1.6.0 \
|
||||
pytest-xdist \
|
||||
pytest-rerunfailures
|
||||
|
||||
RUN pip install torch-ort --no-dependencies
|
||||
ENV ORTMODULE_ONNX_OPSET_VERSION=15
|
||||
|
|
|
|||
Loading…
Reference in a new issue