Skip to content

Commit e4ed1b5

Browse files
authored
Merge pull request #104 from eki-project/dev
Release merge for v1.2.0
2 parents d7ba129 + 6966240 commit e4ed1b5

File tree

150 files changed

+6555
-7469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+6555
-7469
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Generate Builder Config Documentation
2+
3+
on:
4+
pull_request:
5+
branches: [main, dev]
6+
paths:
7+
- 'src/finn/builder/build_dataflow_config.py'
8+
- 'scripts/builder_conf_to_wiki.py'
9+
push:
10+
branches: [dev]
11+
paths:
12+
- 'src/finn/builder/build_dataflow_config.py'
13+
- 'scripts/builder_conf_to_wiki.py'
14+
15+
jobs:
16+
validate-documentation:
17+
name: Validate Documentation Completeness
18+
runs-on: ubuntu-latest
19+
if: github.event_name == 'pull_request'
20+
# Add permissions to allow PR comments
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.9'
33+
34+
- name: Generate documentation with strict mode
35+
id: generate-docs
36+
run: |
37+
cd scripts
38+
echo "Generating documentation in strict mode..."
39+
if output=$(python builder_conf_to_wiki.py --strict --output DataflowBuildConfig_Documentation.md 2>&1); then
40+
echo "✅ Documentation generation successful - all fields are documented"
41+
echo "success=true" >> $GITHUB_OUTPUT
42+
else
43+
echo "❌ Documentation generation failed - undocumented fields found"
44+
echo "success=false" >> $GITHUB_OUTPUT
45+
echo "$output"
46+
47+
# Extract undocumented field names from the output
48+
undocumented_fields=$(echo "$output" | grep "^ - " | sed 's/^ - //' | tr '\n' ',' | sed 's/,$//')
49+
echo "undocumented_fields=$undocumented_fields" >> $GITHUB_OUTPUT
50+
exit 1
51+
fi
52+
53+
- name: Upload generated documentation as artifact
54+
uses: actions/upload-artifact@v4
55+
if: always()
56+
with:
57+
name: builder-config-documentation-pr-${{ github.event.number }}
58+
path: scripts/DataflowBuildConfig_Documentation.md
59+
retention-days: 7
60+
61+
- name: Add PR comment on failure
62+
uses: actions/github-script@v6
63+
if: failure()
64+
with:
65+
script: |
66+
const undocumentedFields = '${{ steps.generate-docs.outputs.undocumented_fields }}';
67+
let body = '❌ **Documentation Check Failed**\n\n';
68+
body += 'Some DataflowBuildConfig fields are missing documentation. Please add documentation comments (starting with `#:`) for all configuration fields before merging.\n\n';
69+
70+
if (undocumentedFields) {
71+
const fields = undocumentedFields.split(',').filter(f => f.trim());
72+
body += '### Missing Documentation for Fields:\n';
73+
fields.forEach(field => {
74+
body += `- \`${field.trim()}\`\n`;
75+
});
76+
body += '\n';
77+
}
78+
79+
github.rest.issues.createComment({
80+
issue_number: context.issue.number,
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
body: body
84+
})
85+
86+
publish-to-wiki:
87+
name: Publish Documentation to Wiki
88+
runs-on: ubuntu-latest
89+
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
90+
permissions:
91+
contents: write
92+
93+
steps:
94+
- name: Checkout repository
95+
uses: actions/checkout@v4
96+
97+
- name: Set up Python
98+
uses: actions/setup-python@v4
99+
with:
100+
python-version: '3.9'
101+
102+
- name: Generate documentation
103+
run: |
104+
cd scripts
105+
echo "Generating DataflowBuildConfig documentation..."
106+
python builder_conf_to_wiki.py --output DataflowBuildConfig_Documentation.md
107+
echo "Documentation generated successfully"
108+
109+
- name: Checkout wiki
110+
uses: actions/checkout@v4
111+
with:
112+
repository: ${{ github.repository }}.wiki
113+
path: wiki
114+
token: ${{ secrets.WIKI_ACCESS_TOKEN }}
115+
continue-on-error: true
116+
117+
- name: Update wiki with generated documentation
118+
run: |
119+
# Copy the generated documentation to wiki
120+
cp scripts/DataflowBuildConfig_Documentation.md wiki/DataflowBuildConfig-Documentation.md
121+
122+
# Navigate to wiki directory
123+
cd wiki
124+
125+
# Configure git
126+
git config --local user.email "[email protected]"
127+
git config --local user.name "GitHub Action"
128+
129+
# Add timestamp to documentation
130+
echo "" >> DataflowBuildConfig-Documentation.md
131+
echo "*Last updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC') by GitHub Actions*" >> DataflowBuildConfig-Documentation.md
132+
echo "*Generated from commit: ${{ github.sha }}*" >> DataflowBuildConfig-Documentation.md
133+
134+
# Add and commit changes
135+
git add .
136+
137+
# Check if there are any changes to commit
138+
if git diff --staged --quiet; then
139+
echo "No changes to wiki documentation"
140+
else
141+
git commit -m "Update DataflowBuildConfig documentation
142+
143+
- Generated from commit ${{ github.sha }}
144+
- Updated on $(date -u '+%Y-%m-%d %H:%M:%S UTC')
145+
- Branch: ${{ github.ref_name }}"
146+
147+
git push
148+
echo "✅ Wiki documentation updated successfully"
149+
echo "📖 Documentation available at: https://github.com/${{ github.repository }}/wiki/DataflowBuildConfig-Documentation"
150+
fi

ci/.gitlab-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
- module load devel/Autoconf/2.71-GCCcore-11.3.0
77
- module load lang/Bison/3.8.2-GCCcore-11.3.0
88
- module load lang/flex/2.6.4-GCCcore-11.3.0
9-
- module load compiler/GCC/11.3.0
109
- module load lib/pybind11/2.9.2-GCCcore-11.3.0
1110
- module load devel/Boost/1.79.0-GCC-11.3.0
1211
- module load lib/fmt/9.1.0-GCCcore-11.3.0
12+
- module load compiler/GCC/11.3.0
1313
- ulimit -s unlimited # Increase stack size limit
1414

1515
.n2_setup_xilinx_2022_2:

ci/cfg/regression_extended.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@
6161
"generate_outputs": [["estimate_reports", "bitfile", "pynq_driver", "deployment_package"]]
6262
},
6363

64-
# ResNet-50
65-
{
66-
"dut": ["resnet50"],
67-
"board": ["U250"],
68-
"synth_clk_period_ns": [5],
69-
# NOTE: At least without manual floorplanning, timing will not meet 200 MHz and drop down automatically!
70-
"rtlsim_batch_size": [3],
71-
# no deployment package because Alveo deployment is not yet supported by CI
72-
"generate_outputs": [["estimate_reports", "rtlsim_performance", "stitched_ip", "out_of_context_synth", "bitfile"]],
73-
"enable_instrumentation": [False]
74-
},
64+
# ResNet-50 (currently disabled due to simulation timeout issue and problematic U250/U280 compatibility)
65+
# {
66+
# "dut": ["resnet50"],
67+
# "board": ["U250"],
68+
# "synth_clk_period_ns": [5],
69+
# # NOTE: At least without manual floorplanning, timing will not meet 200 MHz and drop down automatically!
70+
# "rtlsim_batch_size": [3],
71+
# # no deployment package because Alveo deployment is not yet supported by CI
72+
# "generate_outputs": [["estimate_reports", "rtlsim_performance", "stitched_ip", "out_of_context_synth", "bitfile"]],
73+
# "enable_instrumentation": [False]
74+
# },
7575

7676
# 4x GPT Transformer models (currently disabled due to streamlining issues!)
7777
# {

docs/finn/internals.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ Constraints to folding factors per layer
220220
* - ConvolutionInputGenerator
221221
- SIMD
222222
- inp_channels % SIMD == 0
223-
* - Downsampler
224-
- SIMD
225-
- inp_channels % SIMD == 0
226223
* - DuplicateStreams
227224
- PE
228225
- channels % PE == 0
@@ -250,6 +247,9 @@ Constraints to folding factors per layer
250247
* - Thresholding
251248
- PE
252249
- MH % PE == 0
250+
* - Upsampler
251+
- SIMD
252+
- inp_channels % SIMD == 0
253253
* - VectorVectorActivation
254254
- PE & SIMD
255255
- k_h * k_w % SIMD == 0 & channels % PE == 0

docs/finn/source_code/finn.custom_op.fpgadataflow.hls.rst

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,6 @@ finn.custom\_op.fpgadataflow.concat_hls
3838
:show-inheritance:
3939

4040

41-
finn.custom\_op.fpgadataflow.convolutioninputgenerator_hls
42-
-----------------------------------------------------------
43-
44-
.. automodule:: finn.custom_op.fpgadataflow.hls.convolutioninputgenerator_hls
45-
:members:
46-
:undoc-members:
47-
:show-inheritance:
48-
49-
finn.custom\_op.fpgadataflow.downsampler_hls
50-
---------------------------------------------
51-
52-
.. automodule:: finn.custom_op.fpgadataflow.hls.downsampler_hls
53-
:members:
54-
:undoc-members:
55-
:show-inheritance:
56-
5741
finn.custom\_op.fpgadataflow.duplicatestreams\_hls
5842
-------------------------------------------------------
5943

@@ -62,14 +46,6 @@ finn.custom\_op.fpgadataflow.duplicatestreams\_hls
6246
:undoc-members:
6347
:show-inheritance:
6448

65-
finn.custom\_op.fpgadataflow.fmpadding\_hls
66-
-----------------------------------------------
67-
68-
.. automodule:: finn.custom_op.fpgadataflow.hls.fmpadding_hls
69-
:members:
70-
:undoc-members:
71-
:show-inheritance:
72-
7349
finn.custom\_op.fpgadataflow.fmpadding\_pixel\_hls
7450
---------------------------------------------------
7551

@@ -143,14 +119,6 @@ finn.custom\_op.fpgadataflow.streamingeltwise\_hls
143119
:undoc-members:
144120
:show-inheritance:
145121

146-
finn.custom\_op.fpgadataflow.streamingmaxpool\_hls
147-
-----------------------------------------------------------
148-
149-
.. automodule:: finn.custom_op.fpgadataflow.hls.streamingmaxpool_hls
150-
:members:
151-
:undoc-members:
152-
:show-inheritance:
153-
154122
finn.custom\_op.fpgadataflow.thresholding\_hls
155123
-------------------------------------------------------
156124

docs/finn/source_code/finn.custom_op.fpgadataflow.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ finn.custom\_op.fpgadataflow.convolutioninputgenerator
7171
:undoc-members:
7272
:show-inheritance:
7373

74-
finn.custom\_op.fpgadataflow.downsampler
75-
-----------------------------------------
76-
77-
.. automodule:: finn.custom_op.fpgadataflow.downsampler
78-
:members:
79-
:undoc-members:
80-
:show-inheritance:
81-
8274
finn.custom\_op.fpgadataflow.duplicatestreams
8375
----------------------------------------------
8476

@@ -177,14 +169,6 @@ finn.custom\_op.fpgadataflow.streamingfifo
177169
:undoc-members:
178170
:show-inheritance:
179171

180-
finn.custom\_op.fpgadataflow.streamingmaxpool
181-
----------------------------------------------
182-
183-
.. automodule:: finn.custom_op.fpgadataflow.streamingmaxpool
184-
:members:
185-
:undoc-members:
186-
:show-inheritance:
187-
188172
finn.custom\_op.fpgadataflow.templates
189173
----------------------------------------
190174

0 commit comments

Comments
 (0)