-
Notifications
You must be signed in to change notification settings - Fork 10
163 lines (162 loc) · 6.47 KB
/
make.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved.
#
# Author: Eddie Hung, AMD
#
# SPDX-License-Identifier: MIT
#
name: make
on:
push:
pull_request:
jobs:
make:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
router:
- cuckoo
lutpinswapping:
- false
- true
lutroutethru:
- false
- true
benchmark:
- logicnets_jscl
- boom_med_pb
- vtr_mcml
- rosetta_fd
- corundum_25g
- finn_radioml
- vtr_lu64peeng
- corescore_500
- corescore_500_pb
- mlcad_d181_lefttwo3rds
- koios_dla_like_large
- boom_soc
- ispd16_example2
exclude:
# Insufficient memory on GitHub Actions
- router: cuckoo
benchmark: mlcad_d181_lefttwo3rds
- router: cuckoo
benchmark: koios_dla_like_large
- router: cuckoo
benchmark: boom_soc
- router: cuckoo
benchmark: ispd16_example2
- router: cuckoo
lutpinswapping: true
- router: cuckoo
lutroutethru: true
# NXRoute does not support LUT pin swapping
- router: nxroute-poc
lutpinswapping: true
# NXRoute does not support LUT routethrus
- router: nxroute-poc
lutroutethru: true
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- if: matrix.router == 'nxroute-poc'
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
cache: 'pip'
- name: Download xcvu3p.device
if: matrix.router == 'nxroute-poc' || matrix.router == 'cuckoo'
run:
wget -q https://github.com/Xilinx/fpga24_routing_contest/releases/latest/download/xcvu3p.device
- name: Build capnp-0.10.2
run: |
curl -O https://capnproto.org/capnproto-c++-0.10.2.tar.gz
tar zxf capnproto-c++-0.10.2.tar.gz
cd capnproto-c++-0.10.2
./configure
make
sudo make install
- name: Build OpenPARF/fpga24contest
run: |
sudo apt-get -y install cmake libopenblas-dev libboost-filesystem-dev libboost-program-options-dev
cd OpenPARF/fpga24contest
mkdir build
cd build
cmake ../src -DCMAKE_BUILD_TYPE=Release
make
- env:
REPORT_ROUTE_STATUS_URL: ${{ secrets.REPORT_ROUTE_STATUS_URL }}
REPORT_ROUTE_STATUS_AUTH: ${{ secrets.REPORT_ROUTE_STATUS_AUTH }}
# For certain benchmarks, wirelength_analyzer/CheckPhysNetlist requires more memory than that available in GitHub Actions
WIRELENGTH_ANALYZER_MOCK_RESULT: ${{ matrix.benchmark == 'koios_dla_like_large' }}
CHECK_PHYS_NETLIST_DIFF_MOCK_RESULT: ${{ matrix.benchmark == 'koios_dla_like_large' }}
RWROUTE_FORCE_LUT_PINSWAPPING: ${{ matrix.router == 'rwroute' && matrix.lutpinswapping }}
RWROUTE_FORCE_LUT_ROUTETHRU: ${{ matrix.router == 'rwroute' && matrix.lutroutethru }}
run: |
make ROUTER="${{ matrix.router }}" BENCHMARKS="${{ matrix.benchmark }}" VERBOSE=1
- name: Score summary
run:
make ROUTER="${{ matrix.router }}" BENCHMARKS="${{ matrix.benchmark }}" VERBOSE=1
- name: Verify pass (non nxroute-poc)
if: matrix.router != 'nxroute-poc'
run: |
set -x
# Allow CheckPhysNetlist to fail if no remote access to Vivado
grep -H PASS *.check || (grep -H FAIL *.check && ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }})
grep -H -e "# of nets with routing errors[. :]\+0" *.check.log || ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }}
# But CheckPhysNetlist must have no differences
grep "INFO: No differences found between routed and unrouted netlists" *.check.log
# Check no multiple sources, no stubs
grep "UserWarning: Found [0-9]\+ sources" *.wirelength && exit 1
grep "UserWarning: Found [0-9]\+ stubs" *.wirelength && exit 1
# Check wirelength was computed
grep "^Wirelength: [1-9][0-9]*" *.wirelength
- name: Verify fail (nxroute-poc)
if: matrix.router == 'nxroute-poc'
run: |
set -x
grep -H FAIL *.check
# Only expect report_route_status output if URL given
grep -H -e "# of nets with routing errors[. :]\+[1-9]" -e "# of unrouted nets[. :]\+[1-9]" *.check.log || ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }}
# But CheckPhysNetlist must have no differences (except koios because out-of-memory)
grep "INFO: No differences found between routed and unrouted netlists" *.check.log || ${{ matrix.benchmark == 'koios_dla_like_large' }}
# Check no multiple sources, but expect possibility of stubs since nxroute is unlikely to fully route the design
grep "UserWarning: Found [0-9]\+ sources" *.wirelength && exit 1
grep "UserWarning: Found [0-9]\+ stubs" *.wirelength || true
# Allow wirelength computation to fail since nxroute may not have routed anything or wirelength_analyzer was not run
grep "^Wirelength: [1-9][0-9]*" *.wirelength || true
- uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.router }}${{ matrix.router == 'rwroute' && matrix.lutpinswapping && '-lutpinswapping' || ''}}${{ matrix.router == 'rwroute' && matrix.lutroutethru && '-lutroutethru' || ''}}-${{ matrix.benchmark }}
path: |
*.log
*.check
*.wirelength
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.router }}${{ matrix.router == 'rwroute' && matrix.lutpinswapping && '-lutpinswapping' || ''}}${{ matrix.router == 'rwroute' && matrix.lutroutethru && '-lutroutethru' || ''}}-${{ matrix.benchmark }}
compression-level: 0
path: |
*.dcp
*.phys
${{ matrix.benchmark }}.netlist.edn/*
*_load.tcl
!*_unrouted.phys
merge-logs:
runs-on: ubuntu-latest
needs: make
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: logs
pattern: logs-*
delete-merged: true