-
Notifications
You must be signed in to change notification settings - Fork 12
161 lines (157 loc) · 5.96 KB
/
hw_openroad.yaml
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: HW Synth (Yosys) + PnR (OpenROAD)
on: push
jobs:
changes:
uses: ./.github/workflows/filter.yaml
nangate45:
needs: changes
if: ${{ needs.changes.outputs.hardware == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
subunit: ["halut_encoder_4", "halut_decoder"] # halut_matmul, fp_16_32_adder
container:
image: ghcr.io/joennlae/halutmatmul-conda-hw:latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Yosys synth + OpenROAD PnR
if: ${{ matrix.subunit != 'fp_16_32_adder' }}
run: |
source /venv/bin/activate
cd hardware
ACC_TYPE=INT DATA_WIDTH=8 NUM_M=4 NUM_DECODER_UNITS=2 make halut-open-synth-and-pnr-${{ matrix.subunit }}
- name: Yosys synth + OpenROAD PnR
if: ${{ matrix.subunit == 'fp_16_32_adder' }}
run: |
source /venv/bin/activate
cd hardware
ACC_TYPE=FP32 DATA_WIDTH=16 NUM_M=4 NUM_DECODER_UNITS=2 make halut-open-synth-and-pnr-${{ matrix.subunit }}
- name: Copy & save reports
run: |
cd hardware/target/open-synth-and-pnr/out
tar -cvf report.tar.gz ${{ matrix.subunit }}
cd ..
mkdir -p flow_reports
mv out/report.tar.gz flow_reports/${{ matrix.subunit }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: nangate45-openroad-report
path: hardware/target/open-synth-and-pnr/flow_reports/${{ matrix.subunit }}.tar.gz
- name: Pushes current reports to repo
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }}
with:
source-directory: "hardware/target/open-synth-and-pnr/out/${{ matrix.subunit }}"
destination-github-username: "joennlae"
destination-repository-name: "halutmatmul-openroad-reports"
user-email: [email protected]
target-branch: main
target-directory: "latest/nangate45/${{ matrix.subunit }}"
- name: Get Time
id: time
uses: nanzm/get-time-action@master
with:
timeZone: 0
format: "YYYY-MM-DD-HH-mm-ss"
- name: Pushes current reports to repo
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }}
with:
source-directory: "hardware/target/open-synth-and-pnr/out"
destination-github-username: "joennlae"
destination-repository-name: "halutmatmul-openroad-reports"
user-email: [email protected]
target-branch: main
target-directory: "history/nangate45/${{ matrix.subunit }}/${{ steps.time.outputs.time }}/"
# needs to much memory so it is run on a large machine (was run)
# asap7:
# needs: changes
# if: ${{ needs.changes.outputs.hardware == 'true' }}
# runs-on: ubuntu-latest
# concurrency: vast.ai-hw
# timeout-minutes: 180 # keep costs in check
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v3
# with:
# python-version: "3.9"
# - uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.VAST_AI_SSH_KEY }}
# - name: Run Synth+PAR OpenROAD on vast.ai servers
# run: |
# cd .github/vast.ai
# pip install requests
# ./vast.py set api-key ${{ secrets.VAST_AI_API_KEY }}
# mkdir .ssh
# python vast_ai_helper.py --hardware --image joennlae/halutmatmul-conda-hw:latest
# # scp copy + execution of synth + par is done in vast_ai_helper.py
# - uses: webiny/[email protected]
# id: cleanup-gpu
# name: Cleanup GPU Post
# with:
# run: |
# python vast_ai_helper.py --cleanup --image joennlae/halutmatmul-conda-hw:latest
# - name: Untar report
# run: |
# cd .github/vast.ai
# ls
# tar -xvf report.tar.gz
# - uses: actions/upload-artifact@v3
# with:
# name: asap-7-openroad-report
# path: flow_reports
# - name: Pushes current reports to repo
# uses: cpina/github-action-push-to-another-repository@main
# env:
# SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }}
# with:
# source-directory: ".github/vast.ai/flow_reports"
# destination-github-username: "joennlae"
# destination-repository-name: "halutmatmul-openroad-reports"
# user-email: [email protected]
# target-branch: main
# target-directory: "latest/asap7/"
# - name: Get Time
# id: time
# uses: nanzm/[email protected]
# with:
# timeZone: 0
# format: "YYYY-MM-DD-HH-mm-ss"
# - name: Pushes current reports to repo
# uses: cpina/github-action-push-to-another-repository@main
# env:
# SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }}
# with:
# source-directory: ".github/vast.ai/flow_reports"
# destination-github-username: "joennlae"
# destination-repository-name: "halutmatmul-openroad-reports"
# user-email: [email protected]
# target-branch: main
# target-directory: "history/asap7/${{ steps.time.outputs.time }}/"
# only needed for asap7
# cleanup:
# name: Cleanup check
# needs: asap7
# runs-on: ubuntu-latest
# concurrency: vast.ai-hw
# if: always()
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v3
# with:
# python-version: "3.9"
# - name: Cleanup Vast.ai instances
# run: |
# cd .github/vast.ai
# pip install requests
# ./vast.py set api-key ${{ secrets.VAST_AI_API_KEY }}
# python vast_ai_helper.py --cleanup --image joennlae/halutmatmul-conda-hw:latest