-
Notifications
You must be signed in to change notification settings - Fork 633
76 lines (66 loc) · 2.05 KB
/
win-build.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: win-build
on:
pull_request:
paths:
- "third_party/**"
- "xformers/csrc/**"
- ".github/workflows/win-build.yml"
- ".github/actions/setup-build-cuda/action.yml"
- "setup.py"
- "requirements*.txt"
env:
FORCE_CUDA: 1
MAX_JOBS: 6
DISTUTILS_USE_SDK: 1 # otherwise distutils will complain on windows about multiple versions of msvc
XFORMERS_BUILD_TYPE: "Release"
jobs:
win_build:
strategy:
fail-fast: false
matrix:
arch:
- "8.0"
- "7.0"
name: win-build-${{ matrix.arch }}
runs-on: windows-8-core
env:
PY: python3
TORCH_CUDA_ARCH_LIST: ${{ matrix.arch }}
timeout-minutes: 360
defaults:
run:
shell: bash
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Recursive checkout
uses: actions/checkout@v3
with:
submodules: recursive
path: "."
- name: Setup Runner
uses: ./.github/actions/setup-build-cuda
with:
toolkit_type: "cuda"
toolkit_short_version: "124"
python: "3.9"
- name: Remove internal code
run: |
mkdir -p .github/sync.fairinternal/
touch .github/sync.fairinternal/ossify.sh
chmod +x .github/sync.fairinternal/ossify.sh
.github/sync.fairinternal/ossify.sh
- name: Install build dependencies
run: |
$PY -m pip install wheel setuptools ninja torch==2.5.1 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
git config --global --add safe.directory "*"
$PY -c "import torch; print('torch', torch.__version__)"
$PY -c "import torch; print('torch.cuda', torch.version.cuda)"
- name: Create sdist
run: $PY setup.py sdist
- name: Build from sdist
run: $PY -m pip install -v dist/*
- name: Info
run: |
cd ../../ # So we don't have a folder named `xformers`
XFORMERS_MORE_DETAILS=1 $PY -m xformers.info