-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ort CIs (slow, gpu, train) (#2024)
* update ort CIs * fix train ci * fix gpu ci * gpus all * devel * enable trt * fix * fix * fix * test * rename * change instance * test * use available * update * shorter labels as well * add onnxruntime-traning * fix onnxruntime package checking * fix typo * fix typo * remove torch version * fix trainer * fixed trt ep by using trt docker image (the only way to make sure everything works) * latest trt version * remove pkv speedup timing since never used * trust remote code for training datasets * remove rocm from diffusers tests * move ort training tests to onnxruntime-training * fix ort training * fix * style * always assert closenes and not equality * fixed perceiver * fixed missing position ids when attn mask is given * remove num_labels from output shapes as it's not a dynamic axis * raise error on missing mandatory inputs * added atol and rtol as part of the ORTModelTestMixin class * fix segformer image segmentation * style * fix vision encoder io binding * hot fix io binding, remove its dependency to the order of inputs and make sure it's actually being tested * fix * typo * unify io binding api with non io binding * force evaluated shape to int * mark pix2struct io binding tests * force contiguity in forward pass * fixed cryptic contiguity problems * fix some * fix vision2seq modeling and testing * Update setup.py * update import utils * Update optimum/onnxruntime/modeling_ort.py * fix vision encoder decoder io binding * enable bigbird and bigbirg pegasus and seperate timm slow tests to untangle them * use bigger machine for slow tests * lower atol and rtol for image classification logits * fix * large * enable more Longformer and MCTCT * enable commented models in export as well * uncomment timm slow models, big bird optimization and marian pkv comparison * fix whisper/speech_to_text test and make convolution deterministic * pin torch for ort training * ctc and speech also uses convolution so has to be deterministic * revert vison2seq atol
- Loading branch information
1 parent
d1bcdf7
commit b755036
Showing
43 changed files
with
1,550 additions
and
1,478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,54 @@ | ||
name: ONNX Runtime / Test GPU | ||
name: ONNX Runtime GPU / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 1 */3 * * # at 1am every 3 days | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
# uncomment to enable on PR merge on main branch: | ||
#push: | ||
# branches: | ||
# - main | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || contains( github.event.pull_request.labels.*.name, 'gpu-test') }} | ||
name: Start self-hosted EC2 runner | ||
build: | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains(github.event.pull_request.labels.*.name, 'gpu') || | ||
contains(github.event.pull_request.labels.*.name, 'onnxruntime-gpu') | ||
}} | ||
|
||
runs-on: | ||
group: aws-g6-4xlarge-plus | ||
env: | ||
AWS_REGION: us-east-1 | ||
|
||
container: | ||
image: nvcr.io/nvidia/tensorrt:24.12-py3 | ||
options: --gpus all | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build image | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
docker build -f tests/onnxruntime/docker/Dockerfile_onnxruntime_gpu -t onnxruntime-gpu . | ||
- name: Test with unittest within docker container | ||
pip install --upgrade pip | ||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 | ||
pip install .[tests,onnxruntime-gpu,diffusers] | ||
- name: Test with pytest | ||
run: | | ||
docker run --rm --gpus all -v /mnt/cache/.cache/huggingface:/root/.cache/huggingface --workdir=/workspace/optimum/tests onnxruntime-gpu:latest | ||
pytest tests/onnxruntime -m "cuda_ep_test or trt_ep_test" --durations=0 -vvvv -n auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,50 @@ | ||
name: ONNX Runtime slow / Python - Test | ||
name: ONNX Runtime Slow / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 7 * * * # every day at 7am | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: [ubuntu-20.04] | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains(github.event.pull_request.labels.*.name, 'slow') || | ||
contains(github.event.pull_request.labels.*.name, 'onnxruntime-slow') | ||
}} | ||
|
||
runs-on: | ||
group: aws-general-8-plus | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies for export | ||
run: | | ||
pip install .[tests,onnxruntime,diffusers] | ||
- name: Test with unittest | ||
working-directory: tests | ||
run: | | ||
RUN_SLOW=1 pytest onnxruntime -s -m "run_slow" --durations=0 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
pip install .[tests,onnxruntime,diffusers] | ||
- name: Test with pytest | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime -m "run_slow" --durations=0 -vvvv |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: ONNX Runtime Training / Python - Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 7 * * * # every day at 7am UTC | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- labeled | ||
- reopened | ||
- unlabeled | ||
- synchronize | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
if: ${{ | ||
(github.event_name == 'push') || | ||
(github.event_name == 'workflow_dispatch') || | ||
contains( github.event.pull_request.labels.*.name, 'training') || | ||
contains( github.event.pull_request.labels.*.name, 'onnxruntime-training') | ||
}} | ||
|
||
runs-on: | ||
group: aws-g6-4xlarge-plus | ||
|
||
container: | ||
image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | ||
options: --gpus all | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
env: | ||
TORCH_CUDA_ARCH_LIST: "5.0 6.0 7.0 7.5 8.0 8.6 9.0+PTX" | ||
run: | | ||
pip install --upgrade pip | ||
pip install --no-cache-dir "torch<2.6" torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 | ||
pip install --no-cache-dir torch-ort onnxruntime-training && python -m torch_ort.configure | ||
pip install --no-cache-dir evaluate absl-py rouge_score seqeval sacrebleu nltk scikit-learn | ||
pip install .[tests,onnxruntime-training] | ||
- name: Test with pytest (trainer) | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime-training/test_trainer.py --durations=0 -vvvv | ||
env: | ||
HF_DATASETS_TRUST_REMOTE_CODE: 1 | ||
|
||
- name: Test with pytest (examples) | ||
run: | | ||
RUN_SLOW=1 pytest tests/onnxruntime-training/test_examples.py --durations=0 -vvvv | ||
env: | ||
HF_DATASETS_TRUST_REMOTE_CODE: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.