-
Notifications
You must be signed in to change notification settings - Fork 34
146 lines (124 loc) · 4.25 KB
/
run_tartan.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Build, Run and Test Tartan EcoSystem
name: Build and Run Tartan
on:
schedule:
- cron: '30 23 * * *' # Runs the workflow at midnight every day
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/run_tartan.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# build and run for RISCV
run_riscv_m1_tartan:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
# installs tools, ninja, installs llvm and sets up sccahe
- name: setup ubuntu
uses: ./.github/actions/setup_ubuntu_build
with:
llvm_version: 17
llvm_build_type: RelAssert
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Python libraries and system dependencies
run: |
pip install --user requests numpy h5py Pillow
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install -y libblas-dev libopenblas64-dev libopenblas-dev libpthread-stubs0-dev libboost-all-dev
- name: build riscv M1
uses: ./.github/actions/do_build_ock/do_build_m1
- name: Download Daily Release
run: |
wget "https://github.com/intel/llvm/releases/download/nightly-2023-11-22/sycl_linux.tar.gz"
mkdir linux_nightly_release
tar -xzf sycl_linux.tar.gz -C linux_nightly_release
- name: Build portBLAS
uses: ./.github/actions/build_portBLAS_action
with:
workspace: ${{ github.workspace }}
- name: Build portDNN
uses: ./.github/actions/build_portDNN_action
with:
workspace: ${{ github.workspace }}
- name: Package Build Artifacts
run: |
ls
tar -cvzf artifacts.tar.gz build portDNN_build_dir portBLAS_build_dir
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: tartan-build
path: artifacts.tar.gz
build_and_run_networks:
runs-on: ubuntu-22.04
needs: run_riscv_m1_tartan
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: tartan-build
- name: Untar artifacts
run: |
tar -xvzf artifacts.tar.gz
ls
- name: Build vgg and resnet
uses: ./.github/actions/build_vgg_resnet_action
with:
workspace: ${{ github.workspace }}
publish_OCK_demo_artifacts:
runs-on: ubuntu-22.04
needs: [run_riscv_m1_tartan, build_and_run_networks]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: tartan-build
- name: Download network artifacts
uses: actions/download-artifact@v2
with:
name: network-build
- name: Untar artifacts and package OCK demo tar
run: |
tar -xvzf artifacts.tar.gz
tar -xvzf network_artifacts.tar.gz
ls
tar -cvzf ock_demo.tar.gz build portDNN_build_dir portBLAS_build_dir vdata rdata
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: ock-demo
path: ock_demo.tar.gz
- name: Compute tag
id: tag
run: |
if [ "${{ github.event_name == 'schedule' }}" == "true" ]; then
echo "TAG=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
else
# TODO: Use date of the commit?
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
fi
- name: Create OCK demo release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
files:
ock_demo.tar.gz
tag_name: nightly-${{ steps.tag.outputs.TAG }}
name: OCK daily ${{ steps.tag.outputs.TAG }}
prerelease: true
body: "Daily build ${{ steps.tag.outputs.TAG }}"
target_commitish: ${{ github.sha }}