@@ -3,6 +3,10 @@ name: Lan test workflow x86_64 wheels
3
3
on :
4
4
# pull_request:
5
5
workflow_call :
6
+ inputs :
7
+ fail-fast :
8
+ required : false
9
+ default : " false"
6
10
push :
7
11
branches :
8
12
- main
@@ -46,124 +50,127 @@ jobs:
46
50
echo "${MATRIX_BLOB}"
47
51
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
48
52
49
- # build:
50
- # needs: filter-matrix
51
- # permissions:
52
- # id-token: write
53
- # contents: read
54
- # strategy:
55
- # fail-fast: false
56
- # matrix:
57
- # include:
58
- # - repository: pytorch/tensorrt
59
- # pre-script: packaging/pre_build_script.sh
60
- # env-var-script: packaging/env_vars.txt
61
- # post-script: packaging/post_build_script.sh
62
- # smoke-test-script: packaging/smoke_test_script.sh
63
- # package-name: torch_tensorrt
64
- # name: Build torch-tensorrt whl package
65
- # uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
66
- # with:
67
- # repository: ${{ matrix.repository }}
68
- # ref: ""
69
- # test-infra-repository: pytorch/test-infra
70
- # test-infra-ref: main
71
- # build-matrix: ${{ needs.filter-matrix.outputs.matrix }}
72
- # pre-script: ${{ matrix.pre-script }}
73
- # env-var-script: ${{ matrix.env-var-script }}
74
- # post-script: ${{ matrix.post-script }}
75
- # package-name: ${{ matrix.package-name }}
76
- # smoke-test-script: ${{ matrix.smoke-test-script }}
77
- # trigger-event: ${{ github.event_name }}
53
+ build :
54
+ needs : filter-matrix
55
+ permissions :
56
+ id-token : write
57
+ contents : read
58
+ strategy :
59
+ fail-fast : false
60
+ matrix :
61
+ include :
62
+ - repository : pytorch/tensorrt
63
+ pre-script : packaging/pre_build_script.sh
64
+ env-var-script : packaging/env_vars.txt
65
+ post-script : packaging/post_build_script.sh
66
+ smoke-test-script : packaging/smoke_test_script.sh
67
+ package-name : torch_tensorrt
68
+ name : Build torch-tensorrt whl package
69
+ uses : pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
70
+ with :
71
+ repository : ${{ matrix.repository }}
72
+ ref : " "
73
+ test-infra-repository : pytorch/test-infra
74
+ test-infra-ref : main
75
+ build-matrix : ${{ needs.filter-matrix.outputs.matrix }}
76
+ pre-script : ${{ matrix.pre-script }}
77
+ env-var-script : ${{ matrix.env-var-script }}
78
+ post-script : ${{ matrix.post-script }}
79
+ package-name : ${{ matrix.package-name }}
80
+ smoke-test-script : ${{ matrix.smoke-test-script }}
81
+ trigger-event : ${{ github.event_name }}
78
82
79
- # tests-py-fail-fast:
80
- # name: Test fail fast [Python]
81
- # needs: [filter-matrix, build]
82
- # strategy:
83
- # fail-fast: false
84
- # matrix:
85
- # include:
86
- # - repository: pytorch/tensorrt
87
- # package-name: torch_tensorrt
88
- # pre-script: packaging/pre_build_script.sh
89
- # post-script: packaging/post_build_script.sh
90
- # smoke-test-script: packaging/smoke_test_script.sh
91
- # uses: ./.github/workflows/linux-test.yml
92
- # with:
93
- # job-name: tests-py-critical-fail-fast
94
- # repository: "pytorch/tensorrt"
95
- # ref: ""
96
- # test-infra-repository: pytorch/test-infra
97
- # test-infra-ref: main
98
- # build-matrix: ${{ needs.filter-matrix.outputs.matrix }}
99
- # pre-script: ${{ matrix.pre-script }}
100
- # script: |
101
- # export USE_HOST_DEPS=1
102
- # export CI_BUILD=1
103
- # export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
104
- # pushd .
105
- # python -m pip install -r tests/py/requirements.txt
106
- # cov_param="--cov=torch_tensorrt --cov-report= --cov-config=pyproject.toml"
83
+ tests-py-fail-fast :
84
+ name : Test fail fast [Python]
85
+ if : inputs.fail-fast == 'true'
86
+ needs : [filter-matrix, build]
87
+ strategy :
88
+ fail-fast : false
89
+ matrix :
90
+ include :
91
+ - repository : pytorch/tensorrt
92
+ package-name : torch_tensorrt
93
+ pre-script : packaging/pre_build_script.sh
94
+ post-script : packaging/post_build_script.sh
95
+ smoke-test-script : packaging/smoke_test_script.sh
96
+ uses : ./.github/workflows/linux-test.yml
97
+ with :
98
+ job-name : tests-py-critical-fail-fast
99
+ repository : " pytorch/tensorrt"
100
+ ref : " "
101
+ test-infra-repository : pytorch/test-infra
102
+ test-infra-ref : main
103
+ build-matrix : ${{ needs.filter-matrix.outputs.matrix }}
104
+ pre-script : ${{ matrix.pre-script }}
105
+ script : |
106
+ export USE_HOST_DEPS=1
107
+ export CI_BUILD=1
108
+ export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
109
+ pushd .
110
+ python -m pip install -r tests/py/requirements.txt
111
+ cov_param="--cov=torch_tensorrt --cov-report= --cov-config=pyproject.toml"
107
112
108
- # # test dynamo backend
109
- # python -m pytest -m critical ${cov_param} -n 4 tests/py/dynamo/backend/
113
+ # test dynamo backend
114
+ python -m pytest -m critical ${cov_param} -n 4 tests/py/dynamo/backend/
110
115
111
- # # test dynamo models
112
- # python -m pytest -m critical ${cov_param} -ra --cov-append --ir dynamo tests/py/dynamo/models/
116
+ # test dynamo models
117
+ python -m pytest -m critical ${cov_param} -ra --cov-append --ir dynamo tests/py/dynamo/models/
113
118
114
- # # test dynamo automatic plugin
115
- # python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/automatic_plugin/
119
+ # test dynamo automatic plugin
120
+ python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/automatic_plugin/
116
121
117
- # # test dynamo partitioning
118
- # python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/partitioning/
122
+ # test dynamo partitioning
123
+ python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/partitioning/
119
124
120
- # # test dynamo lowering
121
- # python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/lowering/
125
+ # test dynamo lowering
126
+ python -m pytest -m critical ${cov_param} --cov-append tests/py/dynamo/lowering/
122
127
123
- # # test dynamo runtime
124
- # python -m pytest ${cov_param} --cov-append tests/py/dynamo/runtime/test_000_*
125
- # python -m pytest -m critical ${cov_param} --cov-append --ignore tests/py/dynamo/runtime/test_000_* tests/py/dynamo/runtime/
128
+ # test dynamo runtime
129
+ python -m pytest ${cov_param} --cov-append tests/py/dynamo/runtime/test_000_*
130
+ python -m pytest -m critical ${cov_param} --cov-append --ignore tests/py/dynamo/runtime/test_000_* tests/py/dynamo/runtime/
126
131
127
- # # test core
128
- # python -m pytest -m critical ${cov_param} --cov-append tests/py/core/
132
+ # test core
133
+ python -m pytest -m critical ${cov_param} --cov-append tests/py/core/
129
134
130
- # coverage report --fail-under=20
135
+ coverage report --fail-under=20
131
136
132
- # tests-py-torchscript-fe:
133
- # name: Test torchscript frontend [Python]
134
- # needs: [filter-matrix, build, tests-py-fail-fast]
135
- # strategy:
136
- # fail-fast: false
137
- # matrix:
138
- # include:
139
- # - repository: pytorch/tensorrt
140
- # package-name: torch_tensorrt
141
- # pre-script: packaging/pre_build_script.sh
142
- # post-script: packaging/post_build_script.sh
143
- # smoke-test-script: packaging/smoke_test_script.sh
144
- # uses: ./.github/workflows/linux-test.yml
145
- # with:
146
- # job-name: tests-py-torchscript-fe
147
- # repository: "pytorch/tensorrt"
148
- # ref: ""
149
- # test-infra-repository: pytorch/test-infra
150
- # test-infra-ref: main
151
- # build-matrix: ${{ needs.filter-matrix.outputs.matrix }}
152
- # pre-script: ${{ matrix.pre-script }}
153
- # script: |
154
- # export USE_HOST_DEPS=1
155
- # export CI_BUILD=1
156
- # export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
157
- # pushd .
158
- # cd tests/modules
159
- # python hub.py
160
- # popd
161
- # pushd .
162
- # cd tests/py/ts
163
- # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
164
- # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
165
- # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
166
- # popd
137
+ tests-py-torchscript-fe :
138
+ name : Test torchscript frontend [Python]
139
+ needs : [filter-matrix, build]
140
+ if : inputs.fail-fast == 'false'
141
+ strategy :
142
+ fail-fast : false
143
+ matrix :
144
+ include :
145
+ - repository : pytorch/tensorrt
146
+ package-name : torch_tensorrt
147
+ pre-script : packaging/pre_build_script.sh
148
+ post-script : packaging/post_build_script.sh
149
+ smoke-test-script : packaging/smoke_test_script.sh
150
+ uses : ./.github/workflows/linux-test.yml
151
+ with :
152
+ job-name : tests-py-torchscript-fe
153
+ repository : " pytorch/tensorrt"
154
+ ref : " "
155
+ test-infra-repository : pytorch/test-infra
156
+ test-infra-ref : main
157
+ build-matrix : ${{ needs.filter-matrix.outputs.matrix }}
158
+ pre-script : ${{ matrix.pre-script }}
159
+ script : |
160
+ echo "test"
161
+ # export USE_HOST_DEPS=1
162
+ # export CI_BUILD=1
163
+ # export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
164
+ # pushd .
165
+ # cd tests/modules
166
+ # python hub.py
167
+ # popd
168
+ # pushd .
169
+ # cd tests/py/ts
170
+ # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
171
+ # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
172
+ # python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
173
+ # popd
167
174
168
175
# tests-py-dynamo-converters:
169
176
# name: Test dynamo converters [Python]
0 commit comments