Skip to content

Commit fd16d28

Browse files
author
wayuanho
authored
Merge pull request #646 from lucienwang1009/nightly_test
enable unittests on onnxruntime nightly build
2 parents 428b67e + c639abc commit fd16d28

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed
Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
# Test against latest onnxruntime nightly package
22

3-
jobs:
4-
- template: 'templates/job_generator.yml'
5-
parameters:
6-
tf_versions: ['1.14']
7-
onnx_opsets: ['']
8-
onnx_backends:
9-
onnxruntime: ['']
10-
job:
11-
steps:
12-
- template: 'unit_test.yml'
13-
parameters:
14-
onnx_opsets: ['10', '9', '8', '7']
15-
report_coverage: 'True'
3+
stages:
4+
- stage:
5+
jobs:
6+
- template: 'templates/job_generator.yml'
7+
parameters:
8+
platforms: ['linux', 'windows', 'mac']
9+
python_versions: ['3.6', '3.5']
10+
tf_versions: ['1.13.1','1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
11+
onnx_opsets: ['']
12+
onnx_backends: {onnxruntime: ['nightly']}
13+
job:
14+
steps:
15+
- template: 'unit_test.yml'
16+
report_coverage: 'True'
1617

17-
- template: 'templates/combine_test_coverage.yml'
18+
- template: 'templates/job_generator.yml'
19+
parameters:
20+
platforms: ['linux', 'windows', 'mac']
21+
python_versions: ['3.7', '3.6', '3.5']
22+
tf_versions: ['1.14']
23+
onnx_opsets: ['']
24+
onnx_backends: {onnxruntime: ['nightly']}
25+
job:
26+
steps:
27+
- template: 'unit_test.yml'
28+
report_coverage: 'True'
29+
30+
- template: 'templates/combine_test_coverage.yml'
31+
32+
schedules:
33+
- cron: "0 16 * * *"
34+
displayName: Daily onnxruntime nightly unittest
35+
branches:
36+
include:
37+
- master

ci_build/azure_pipelines/templates/job_generator.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ jobs:
5555
${{ if eq(onnx_backend_version, '') }}:
5656
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
5757
${{ if ne(onnx_backend_version, '') }}:
58-
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
58+
${{ if ne(onnx_backend_version, 'nightly') }}:
59+
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
60+
${{ if eq(onnx_backend_version, 'nightly') }}:
61+
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
62+
CI_ONNXRUNTIME_NIGHTLY: 'true'
5963

6064
${{ if eq(onnx_opset, '') }}:
6165
${{ format('{0} python{1} tf{2} onnx{3} {4}{5}', platform, python_version, tf_version, onnx_version, onnx_backend.key, onnx_backend_version) }}:
@@ -85,7 +89,11 @@ jobs:
8589
${{ if eq(onnx_backend_version, '') }}:
8690
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
8791
${{ if ne(onnx_backend_version, '') }}:
88-
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
92+
${{ if ne(onnx_backend_version, 'nightly') }}:
93+
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
94+
${{ if eq(onnx_backend_version, 'nightly') }}:
95+
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
96+
CI_ONNXRUNTIME_NIGHTLY: 'true'
8997

9098
# Insert all properties other than pool/steps/strategy
9199
${{ each pair in parameters.job }}:

ci_build/azure_pipelines/templates/setup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ steps:
1515
1616
if [[ $CI_ONNXRUNTIME_NIGHTLY == "true" ]] ;
1717
then
18+
pip uninstall -y onnxruntime
1819
pip install --index-url https://test.pypi.org/simple/ ort-nightly --force-reinstall
1920
fi
2021

tf2onnx/onnx_opset/tensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _make_gathernd_inner_loop(ctx, params, index, dtype):
343343

344344
# body graph creation
345345
g = ctx.create_new_graph_with_same_config()
346-
g.add_graph_input(trip_name, TensorProto.INT64, [])
346+
g.add_graph_input(trip_name, TensorProto.INT64, [1])
347347
g.add_graph_input(cond_name, TensorProto.BOOL, [])
348348
g.add_graph_input(cur_name, dtype, [])
349349
g.parent_graph = ctx
@@ -397,7 +397,7 @@ def make_gathernd(ctx, params, indices, output, scope_name, t_params, shapes, dt
397397
dummy_out_name = utils.make_name("dummy_out")
398398
result_name = utils.make_name("res")
399399

400-
g.add_graph_input(trip_name, TensorProto.INT64, [])
400+
g.add_graph_input(trip_name, TensorProto.INT64, [1])
401401
g.add_graph_input(cond_name, TensorProto.BOOL, [])
402402
g.add_graph_input(dummy_name, t_params, [])
403403
g.parent_graph = ctx

0 commit comments

Comments
 (0)