Skip to content

Commit 8fc92e6

Browse files
Merge pull request #10 from ROCmSoftwarePlatform/IFU-main-2022-09-15
IFU-main-2022-09-15
2 parents 6b5b73e + 5b83342 commit 8fc92e6

File tree

19 files changed

+537
-26
lines changed

19 files changed

+537
-26
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 'validate-binary'
2+
description: 'Binary Conda or Wheel Validation for Linux and MacOS'
3+
inputs:
4+
gpu_arch_type:
5+
description: 'GPU arch type'
6+
required: true
7+
default: 'cpu'
8+
gpu_arch_ver:
9+
description: 'GPU arch version'
10+
required: true
11+
default: 'cpu'
12+
installation:
13+
description: 'Installation instructions'
14+
required: true
15+
default: ''
16+
python_version:
17+
description: 'Python version'
18+
required: true
19+
default: '3.9'
20+
target_os:
21+
description: 'Target OS linux or macos'
22+
required: false
23+
default: 'linux'
24+
runs:
25+
using: "composite"
26+
steps:
27+
- name: Checkout PyTorch builder
28+
uses: actions/checkout@v2
29+
- name: Check nvidia smi
30+
if: ${{ inputs.gpu_arch_type == 'cuda' }}
31+
shell: bash
32+
run: |
33+
nvidia-smi
34+
- name: Install Conda Linux
35+
if: ${{ inputs.target_os == 'linux' }}
36+
uses: conda-incubator/setup-miniconda@v2
37+
with:
38+
python-version: ${{ inputs.python_version }}
39+
auto-update-conda: true
40+
miniconda-version: "latest"
41+
activate-environment: testenv
42+
- name: Install Conda MacOS
43+
if: ${{ inputs.target_os == 'macos' }}
44+
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
45+
- name: Install PyTorch and run tests
46+
shell: bash
47+
env:
48+
GPU_ARCH_VER: ${{ inputs.gpu_arch_ver }}
49+
GPU_ARCH_TYPE: ${{ inputs.gpu_arch_type }}
50+
INSTALLATION: ${{ inputs.installation }}
51+
ENV_NAME: conda-env-${{ github.run_id }}
52+
run: |
53+
set -ex
54+
conda create -yp ${ENV_NAME} python=${{ inputs.python_version }} numpy
55+
conda run -p ${ENV_NAME} $INSTALLATION
56+
conda run -p ${ENV_NAME} python3 ./test/smoke_test/smoke_test.py
57+
conda env remove -p ${ENV_NAME}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'validate-windows-binary'
2+
description: 'Windows Binary Conda or Wheel Validation'
3+
inputs:
4+
gpu_arch_type:
5+
description: 'GPU arch type'
6+
required: true
7+
default: 'cpu'
8+
gpu_arch_ver:
9+
description: 'GPU arch version'
10+
required: true
11+
default: 'cpu'
12+
installation:
13+
description: 'Installation instructions'
14+
required: true
15+
default: ''
16+
python_version:
17+
description: 'Python version'
18+
required: true
19+
default: '3.9'
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Check nvidia smi
24+
if: ${{ inputs.gpu_arch_type == 'cuda' }}
25+
shell: powershell
26+
run: |
27+
nvidia-smi
28+
- name: Install conda
29+
if: ${{ inputs.gpu_arch_type == 'cpu' }}
30+
uses: conda-incubator/setup-miniconda@v2
31+
with:
32+
python-version: ${{ inputs.python_version }}
33+
auto-update-conda: true
34+
miniconda-version: "latest"
35+
activate-environment: conda-env-${{ github.run_id }}
36+
- name: Conda Install pytorch and smoke test
37+
shell: powershell
38+
env:
39+
GPU_ARCH_VER: ${{ inputs.gpu_arch_ver }}
40+
GPU_ARCH_TYPE: ${{ inputs.gpu_arch_type }}
41+
CUDA_VER: ${{ inputs.desired_cuda }}
42+
run: |
43+
conda install numpy pillow python=${{ inputs.python_version }}
44+
$install = '${{ inputs.installation }}'
45+
Invoke-Expression $install
46+
python ./test/smoke_test/smoke_test.py

.github/scale-config.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/build-magma-linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
main
77
paths:
88
- magma/*
9+
- magma/package_files/*
910
- common/install_conda.sh
1011
- .github/workflows/build-magma-linux.yml
1112
pull_request:
1213
paths:
1314
- magma/*
15+
- magma/package_files/*
1416
- common/install_conda.sh
1517
- .github/workflows/build-magma-linux.yml
1618

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Validate linux binaries
2+
3+
on:
4+
push:
5+
branches:
6+
main
7+
paths:
8+
- .github/workflows/validate-linux-binaries.yml
9+
pull_request:
10+
paths:
11+
- .github/workflows/validate-linux-binaries.yml
12+
jobs:
13+
generate-conda-matrix:
14+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
15+
with:
16+
package-type: conda
17+
os: linux
18+
channel: nightly
19+
generate-wheel-matrix:
20+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
21+
with:
22+
package-type: wheel
23+
os: linux
24+
channel: nightly
25+
generate-libtorch-matrix:
26+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
27+
with:
28+
package-type: libtorch
29+
os: linux
30+
channel: nightly
31+
validate-linux-binaries-conda:
32+
needs: generate-conda-matrix
33+
strategy:
34+
matrix:
35+
${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
36+
fail-fast: false
37+
runs-on: ${{ matrix.validation_runner }}
38+
steps:
39+
- name: Validate binary conda
40+
uses: pytorch/builder/.github/actions/validate-binary@main
41+
with:
42+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
43+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
44+
installation: ${{ matrix.installation }}
45+
python_version: ${{ matrix.python_version }}
46+
validate-linux-binaries-wheels:
47+
needs: generate-wheel-matrix
48+
strategy:
49+
matrix:
50+
${{ fromJson(needs.generate-wheel-matrix.outputs.matrix) }}
51+
fail-fast: false
52+
runs-on: ${{ matrix.validation_runner }}
53+
steps:
54+
- name: Validate binary wheel
55+
uses: pytorch/builder/.github/actions/validate-binary@main
56+
with:
57+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
58+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
59+
installation: ${{ matrix.installation }}
60+
python_version: ${{ matrix.python_version }}
61+
validate-linux-libtorch-binaries:
62+
needs: generate-libtorch-matrix
63+
strategy:
64+
matrix:
65+
${{ fromJson(needs.generate-libtorch-matrix.outputs.matrix) }}
66+
fail-fast: false
67+
runs-on: "ubuntu-20.04"
68+
env:
69+
PYTHON_VERSION: ${{ matrix.python_version }}
70+
steps:
71+
- name: Install pytorch and smoke test
72+
env:
73+
INSTALLATION: ${{ matrix.installation }}
74+
ENV_NAME: conda-env-${{ github.run_id }}
75+
run: |
76+
sudo apt-get install unzip -y
77+
set -ex
78+
curl ${INSTALLATION} -o libtorch.zip
79+
unzip libtorch.zip
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Validate MacOS Binaries
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/validate-macos-binaries.yml
7+
jobs:
8+
generate-arm64-conda-matrix:
9+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
10+
with:
11+
package-type: conda
12+
os: macos-arm64
13+
channel: all
14+
generate-arm64-wheel-matrix:
15+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
16+
with:
17+
package-type: wheel
18+
os: macos-arm64
19+
channel: all
20+
generate-x86_64-conda-matrix:
21+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
22+
with:
23+
package-type: conda
24+
os: macos-x86_64
25+
channel: all
26+
generate-x86_64-wheel-matrix:
27+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
28+
with:
29+
package-type: wheel
30+
os: macos-x86_64
31+
channel: all
32+
33+
validate-macos-arm64-binaries-conda:
34+
needs: generate-arm64-conda-matrix
35+
strategy:
36+
matrix:
37+
${{ fromJson(needs.generate-arm64-conda-matrix.outputs.matrix) }}
38+
fail-fast: false
39+
runs-on: ${{ matrix.validation_runner }}
40+
steps:
41+
- name: Validate binary conda
42+
uses: pytorch/builder/.github/actions/validate-binary@main
43+
with:
44+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
45+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
46+
installation: ${{ matrix.installation }}
47+
python_version: ${{ matrix.python_version }}
48+
target_os: macos
49+
validate-macos-arm64-binaries-wheel:
50+
needs: generate-arm64-wheel-matrix
51+
strategy:
52+
matrix:
53+
${{ fromJson(needs.generate-arm64-wheel-matrix.outputs.matrix) }}
54+
fail-fast: false
55+
runs-on: ${{ matrix.validation_runner }}
56+
steps:
57+
- name: Validate binary wheel
58+
uses: pytorch/builder/.github/actions/validate-binary@main
59+
with:
60+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
61+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
62+
installation: ${{ matrix.installation }}
63+
python_version: ${{ matrix.python_version }}
64+
target_os: macos
65+
validate-macos-x86_64-binaries-conda:
66+
needs: generate-x86_64-conda-matrix
67+
strategy:
68+
matrix:
69+
${{ fromJson(needs.generate-x86_64-conda-matrix.outputs.matrix) }}
70+
fail-fast: false
71+
runs-on: ${{ matrix.validation_runner }}
72+
steps:
73+
- name: Validate binary conda
74+
uses: pytorch/builder/.github/actions/validate-binary@main
75+
with:
76+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
77+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
78+
installation: ${{ matrix.installation }}
79+
python_version: ${{ matrix.python_version }}
80+
target_os: macos
81+
validate-macos-x86_64-binaries-wheel:
82+
needs: generate-x86_64-wheel-matrix
83+
strategy:
84+
matrix:
85+
${{ fromJson(needs.generate-x86_64-wheel-matrix.outputs.matrix) }}
86+
fail-fast: false
87+
runs-on: ${{ matrix.validation_runner }}
88+
steps:
89+
- name: Validate binary wheel
90+
uses: pytorch/builder/.github/actions/validate-binary@main
91+
with:
92+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
93+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
94+
installation: ${{ matrix.installation }}
95+
python_version: ${{ matrix.python_version }}
96+
target_os: macos
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Validate binary images
2+
3+
on:
4+
push:
5+
branches:
6+
main
7+
paths:
8+
- .github/workflows/validate-windows-binaries.yml
9+
pull_request:
10+
paths:
11+
- .github/workflows/validate-windows-binaries.yml
12+
jobs:
13+
generate-conda-matrix:
14+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
15+
with:
16+
package-type: conda
17+
os: windows
18+
channel: nightly
19+
generate-wheel-matrix:
20+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
21+
with:
22+
package-type: wheel
23+
os: windows
24+
channel: nightly
25+
generate-libtorch-matrix:
26+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
27+
with:
28+
package-type: libtorch
29+
os: windows
30+
channel: nightly
31+
validate-windows-binaries-conda:
32+
needs: generate-conda-matrix
33+
strategy:
34+
matrix:
35+
${{ fromJson(needs.generate-conda-matrix.outputs.matrix) }}
36+
fail-fast: false
37+
runs-on: ${{ matrix.validation_runner }}
38+
steps:
39+
- name: Checkout PyTorch builder
40+
uses: actions/checkout@v2
41+
- name: Validate binary conda
42+
uses: ./.github/actions/validate-windows-binary
43+
with:
44+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
45+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
46+
installation: ${{ matrix.installation }}
47+
python_version: ${{ matrix.python_version }}
48+
validate-windows-binaries-wheel:
49+
needs: generate-wheel-matrix
50+
strategy:
51+
matrix:
52+
${{ fromJson(needs.generate-wheel-matrix.outputs.matrix) }}
53+
fail-fast: false
54+
runs-on: ${{ matrix.validation_runner }}
55+
steps:
56+
- name: Checkout PyTorch builder
57+
uses: actions/checkout@v2
58+
- name: Validate binary wheel
59+
uses: ./.github/actions/validate-windows-binary
60+
with:
61+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
62+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
63+
installation: ${{ matrix.installation }}
64+
python_version: ${{ matrix.python_version }}
65+
validate-linux-libtorch-binaries:
66+
needs: generate-libtorch-matrix
67+
strategy:
68+
matrix:
69+
${{ fromJson(needs.generate-libtorch-matrix.outputs.matrix) }}
70+
fail-fast: false
71+
runs-on: "windows-2019"
72+
env:
73+
PYTHON_VERSION: ${{ matrix.python_version }}
74+
steps:
75+
- name: Install pytorch and smoke test
76+
shell: powershell
77+
run: |
78+
$install = '${{ matrix.installation }}'
79+
Invoke-WebRequest -Uri $install -OutFile 'libtorch.zip'
80+
Expand-Archive -Force libtorch.zip .

common/install_cuda.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ function install_117 {
109109

110110
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
111111
mkdir tmp_cudnn && cd tmp_cudnn
112-
wget -q https://developer.download.nvidia.com/compute/redist/cudnn/v8.3.2/local_installers/11.5/cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz -O cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
113-
tar xf cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
114-
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/include/* /usr/local/cuda/include/
115-
cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/lib/* /usr/local/cuda/lib64/
112+
wget -q https://ossci-linux.s3.amazonaws.com/cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz -O cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
113+
tar xf cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
114+
cp -a cudnn-linux-x86_64-8.5.0.96_cuda11-archive/include/* /usr/local/cuda/include/
115+
cp -a cudnn-linux-x86_64-8.5.0.96_cuda11-archive/lib/* /usr/local/cuda/lib64/
116116
cd ..
117117
rm -rf tmp_cudnn
118118
ldconfig

0 commit comments

Comments
 (0)