forked from pytorch/xla
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.42 KB
/
_build_torch_with_cuda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: build-torch-with-cuda
on:
workflow_call:
inputs:
dev-image:
required: true
type: string
description: Base image for builds
torch-commit:
required: true
type: string
description: torch-commit
runner:
required: false
type: string
description: Runner type for the test
default: linux.12xlarge
jobs:
build:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.dev-image }}
env:
_GLIBCXX_USE_CXX11_ABI: 0
steps:
- name: Checkout actions
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/workflows/setup
path: .actions
- name: Setup
uses: ./.actions/.github/workflows/setup
with:
torch-commit: ${{ inputs.torch-commit }}
cuda: true
- name: Checkout PyTorch Repo
uses: actions/checkout@v4
with:
repository: pytorch/pytorch
path: pytorch
ref: ${{ inputs.torch-commit }}
submodules: recursive
- name: Build PyTorch with CUDA enabled
shell: bash
run: |
cd pytorch
TORCH_CUDA_ARCH_LIST="5.2;8.6" USE_CUDA=1 MAX_JOBS="$(nproc --ignore=4)" python setup.py bdist_wheel
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: torch-with-cuda
path: pytorch/dist/*.whl