|
7 | 7 | description: "Channel to use (nightly, test, release, all)"
|
8 | 8 | required: true
|
9 | 9 | type: string
|
| 10 | + ref: |
| 11 | + description: 'Reference to checkout, defaults to empty' |
| 12 | + default: "" |
| 13 | + required: false |
| 14 | + type: string |
10 | 15 | workflow_dispatch:
|
11 | 16 | inputs:
|
12 | 17 | channel:
|
|
18 | 23 | - nightly
|
19 | 24 | - test
|
20 | 25 | - all
|
| 26 | + ref: |
| 27 | + description: 'Reference to checkout, defaults to empty' |
| 28 | + default: "" |
| 29 | + required: false |
| 30 | + type: string |
21 | 31 |
|
22 | 32 | jobs:
|
23 |
| - generate-linux-conda-matrix: |
24 |
| - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main |
25 |
| - with: |
26 |
| - package-type: conda |
27 |
| - os: linux |
28 |
| - channel: ${{ inputs.channel }} |
29 |
| - generate-linux-wheel-matrix: |
30 |
| - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main |
31 |
| - with: |
32 |
| - package-type: wheel |
33 |
| - os: linux |
34 |
| - channel: ${{ inputs.channel }} |
35 |
| - with-py311: enable |
36 |
| - generate-linux-libtorch-matrix: |
| 33 | + generate-linux-matrix: |
37 | 34 | uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
|
38 | 35 | with:
|
39 |
| - package-type: libtorch |
| 36 | + package-type: all |
40 | 37 | os: linux
|
41 | 38 | channel: ${{ inputs.channel }}
|
42 | 39 |
|
43 |
| - linux-conda: |
44 |
| - needs: generate-linux-conda-matrix |
45 |
| - strategy: |
46 |
| - matrix: |
47 |
| - ${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }} |
48 |
| - fail-fast: false |
49 |
| - runs-on: ${{ matrix.validation_runner }} |
50 |
| - steps: |
51 |
| - - name: Validate binary conda |
52 |
| - uses: pytorch/builder/.github/actions/validate-binary@main |
53 |
| - with: |
54 |
| - gpu_arch_type: ${{ matrix.gpu_arch_type }} |
55 |
| - gpu_arch_ver: ${{ matrix.gpu_arch_version }} |
56 |
| - installation: ${{ matrix.installation }} |
57 |
| - python_version: ${{ matrix.python_version }} |
58 |
| - desired_cuda: ${{ matrix.desired_cuda }} |
59 |
| - dev_toolset: '' |
60 |
| - package_type: conda |
61 |
| - target_os: linux |
62 |
| - |
63 |
| - linux-wheel: |
64 |
| - needs: generate-linux-wheel-matrix |
| 40 | + linux: |
| 41 | + needs: generate-linux-matrix |
65 | 42 | strategy:
|
66 |
| - matrix: |
67 |
| - ${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }} |
| 43 | + matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }} |
68 | 44 | fail-fast: false
|
69 |
| - runs-on: ${{ matrix.validation_runner }} |
70 |
| - steps: |
71 |
| - - name: Checkout PyTorch builder |
72 |
| - uses: actions/checkout@v2 |
73 |
| - - name: Validate binary wheel |
74 |
| - uses: ./.github/actions/validate-binary |
75 |
| - with: |
76 |
| - gpu_arch_type: ${{ matrix.gpu_arch_type }} |
77 |
| - gpu_arch_ver: ${{ matrix.gpu_arch_version }} |
78 |
| - installation: ${{ matrix.installation }} |
79 |
| - installation_pypi: ${{ matrix.installation_pypi }} |
80 |
| - python_version: ${{ matrix.python_version }} |
81 |
| - desired_cuda: ${{ matrix.desired_cuda }} |
82 |
| - dev_toolset: '' |
83 |
| - package_type: wheel |
84 |
| - target_os: linux |
| 45 | + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main |
| 46 | + name: ${{ matrix.build_name }} |
| 47 | + with: |
| 48 | + runner: ${{ matrix.validation_runner }} |
| 49 | + repository: "pytorch/builder" |
| 50 | + ref: ${{ inputs.ref || github.ref }} |
| 51 | + job-name: ${{ matrix.build_name }} |
| 52 | + script: | |
| 53 | + set -ex |
| 54 | + export ENV_NAME="conda-env-${{ github.run_id }}" |
| 55 | + export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" |
| 56 | + export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" |
| 57 | + export INSTALLATION="${{ matrix.installation }}" |
| 58 | + export CUDA_VER="${{ matrix.desired_cuda }}" |
| 59 | + export DESIRED_PYTHON="${{ matrix.python_version }}" |
| 60 | + export DESIRED_CUDA="${{ matrix.desired_cuda }}" |
| 61 | + export DESIRED_DEVTOOLSET="${{ matrix.devtoolset }}" |
| 62 | + export PACKAGE_TYPE="${{ matrix.package_type }}" |
| 63 | + export TARGET_OS="linux" |
| 64 | + conda create -y -n ${ENV_NAME} python=${{ matrix.python_version }} numpy pillow |
| 65 | + conda activate ${ENV_NAME} |
| 66 | + export CONDA_LIBRARY_PATH="$(dirname $(which python))/../lib" |
| 67 | + export LD_LIBRARY_PATH=$CONDA_LIBRARY_PATH:$LD_LIBRARY_PATH |
85 | 68 |
|
86 |
| - linux-libt: |
87 |
| - needs: generate-linux-libtorch-matrix |
88 |
| - strategy: |
89 |
| - matrix: |
90 |
| - ${{ fromJson(needs.generate-linux-libtorch-matrix.outputs.matrix) }} |
91 |
| - fail-fast: false |
92 |
| - runs-on: ${{ matrix.validation_runner }} |
93 |
| - env: |
94 |
| - PYTHON_VERSION: ${{ matrix.python_version }} |
95 |
| - steps: |
96 |
| - - name: Checkout PyTorch builder |
97 |
| - uses: actions/checkout@v2 |
98 |
| - - name: Install Conda |
99 |
| - uses: conda-incubator/setup-miniconda@v2 |
100 |
| - with: |
101 |
| - python-version: ${{ matrix.python_version }} |
102 |
| - auto-update-conda: true |
103 |
| - miniconda-version: "latest" |
104 |
| - activate-environment: testenv |
105 |
| - - name: Install pytorch and smoke test |
106 |
| - shell: bash |
107 |
| - env: |
108 |
| - INSTALLATION: ${{ matrix.installation }} |
109 |
| - ENV_NAME: conda-env-${{ github.run_id }} |
110 |
| - DESIRED_PYTHON: ${{ matrix.python_version }} |
111 |
| - DESIRED_CUDA: ${{ matrix.desired_cuda }} |
112 |
| - DESIRED_DEVTOOLSET: ${{ matrix.devtoolset }} |
113 |
| - PACKAGE_TYPE: libtorch |
114 |
| - run: | |
115 |
| - sudo apt-get install unzip -y |
116 |
| - set -ex |
117 |
| - curl ${INSTALLATION} -o libtorch.zip |
| 69 | + if [[ ${{ matrix.package_type }} == "libtorch" ]]; then |
| 70 | + curl ${{ matrix.installation }} -o libtorch.zip |
118 | 71 | unzip libtorch.zip
|
119 |
| - conda create -yp ${ENV_NAME} python=${{ matrix.python_version }} numpy |
120 |
| - export LD_LIBRARY_PATH="$(dirname $(which python))/lib" |
121 |
| - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib |
122 |
| - if [[ ${{ matrix.libtorch_variant }} == "static-with-deps" ]]; then |
123 |
| - conda run -p ${ENV_NAME} --cwd libtorch env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} bash ./../check_binary.sh |
124 |
| - fi |
125 |
| - conda env remove -p ${ENV_NAME} |
| 72 | + else |
| 73 | + eval $INSTALLATION |
| 74 | + python ./test/smoke_test/smoke_test.py |
| 75 | + ${PWD}/check_binary.sh |
| 76 | + fi |
0 commit comments