Skip to content

Commit e66c53f

Browse files
committed
test
1 parent 341b4d9 commit e66c53f

File tree

5 files changed

+158
-176
lines changed

5 files changed

+158
-176
lines changed

.github/workflows/build-test-all.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,17 @@ permissions:
1919
packages: write
2020

2121
jobs:
22-
generate-matrix:
23-
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
22+
trigger-fail-fast-test:
23+
permissions:
24+
id-token: write
25+
contents: read
26+
packages: write
27+
uses: ./.github/workflows/build-test-linux-x86_64.yml
2428
with:
25-
package-type: wheel
26-
os: linux
27-
test-infra-repository: pytorch/test-infra
28-
test-infra-ref: main
29-
with-rocm: false
30-
with-cpu: false
31-
32-
filter-matrix:
33-
needs: [generate-matrix]
34-
outputs:
35-
matrix: ${{ steps.generate.outputs.matrix }}
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/setup-python@v5
39-
with:
40-
python-version: '3.11'
41-
- uses: actions/checkout@v4
42-
with:
43-
repository: pytorch/tensorrt
44-
- name: Generate matrix
45-
id: generate
46-
run: |
47-
set -eou pipefail
48-
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
49-
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}")"
50-
echo "${MATRIX_BLOB}"
51-
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
52-
29+
fail-fast: true
30+
5331
trigger-linux-test:
54-
needs: [filter-matrix]
32+
needs: [trigger-fail-fast-test]
5533
if: always()
5634
permissions:
5735
id-token: write
@@ -60,7 +38,7 @@ jobs:
6038
uses: ./.github/workflows/build-test-linux-x86_64.yml
6139

6240
trigger-windows-test:
63-
needs: [filter-matrix]
41+
needs: [trigger-fail-fast-test]
6442
if: always()
6543
permissions:
6644
id-token: write

.github/workflows/build-test-linux-aarch64.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Build and test Linux aarch64 wheels
22

33
on:
44
#pull_request:
5-
workflow_run:
6-
workflows: ["Build and test Linux x86_64 wheels"]
7-
types:
8-
- completed
95
push:
106
branches:
117
- main

.github/workflows/build-test-linux-x86_64.yml

Lines changed: 115 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Lan test workflow x86_64 wheels
33
on:
44
#pull_request:
55
workflow_call:
6+
inputs:
7+
fail-fast:
8+
required: false
9+
default: "false"
610
push:
711
branches:
812
- main
@@ -46,124 +50,127 @@ jobs:
4650
echo "${MATRIX_BLOB}"
4751
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
4852
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 }}
7882

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"
107112
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/
110115
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/
113118
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/
116121
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/
119124
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/
122127
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/
126131
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/
129134
130-
# coverage report --fail-under=20
135+
coverage report --fail-under=20
131136
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
167174
168175
# tests-py-dynamo-converters:
169176
# name: Test dynamo converters [Python]

.github/workflows/build-test-windows.yml

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -87,37 +87,38 @@ jobs:
8787
trigger-event: ${{ github.event_name }}
8888
timeout: 120
8989

90-
# tests-py-torchscript-fe:
91-
# name: Test torchscript frontend [Python]
92-
# needs: [substitute-runner, build]
93-
# strategy:
94-
# fail-fast: false
95-
# matrix:
96-
# include:
97-
# - repository: pytorch/tensorrt
98-
# package-name: torch_tensorrt
99-
# uses: ./.github/workflows/windows-test.yml
100-
# with:
101-
# job-name: tests-py-torchscript-fe
102-
# repository: ${{ matrix.repository }}
103-
# ref: ""
104-
# test-infra-repository: pytorch/test-infra
105-
# test-infra-ref: main
106-
# build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
107-
# pre-script: packaging/driver_upgrade.bat
108-
# script: |
109-
# export USE_HOST_DEPS=1
110-
# export CI_BUILD=1
111-
# pushd .
112-
# cd tests/modules
113-
# python hub.py
114-
# popd
115-
# pushd .
116-
# cd tests/py/ts
117-
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
118-
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
119-
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
120-
# popd
90+
tests-py-torchscript-fe:
91+
name: Test torchscript frontend [Python]
92+
needs: [substitute-runner, build]
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
include:
97+
- repository: pytorch/tensorrt
98+
package-name: torch_tensorrt
99+
uses: ./.github/workflows/windows-test.yml
100+
with:
101+
job-name: tests-py-torchscript-fe
102+
repository: ${{ matrix.repository }}
103+
ref: ""
104+
test-infra-repository: pytorch/test-infra
105+
test-infra-ref: main
106+
build-matrix: ${{ needs.substitute-runner.outputs.matrix }}
107+
pre-script: packaging/driver_upgrade.bat
108+
script: |
109+
echo "test"
110+
# export USE_HOST_DEPS=1
111+
# export CI_BUILD=1
112+
# pushd .
113+
# cd tests/modules
114+
# python hub.py
115+
# popd
116+
# pushd .
117+
# cd tests/py/ts
118+
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
119+
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
120+
# python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
121+
# popd
121122
122123
# tests-py-dynamo-converters:
123124
# name: Test dynamo converters [Python]

.github/workflows/test_a.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Lan test a
22

33
on:
4-
pull_request:
4+
#pull_request:
55

66
jobs:
77
pre-test:

0 commit comments

Comments
 (0)