Skip to content

Switch to new Transformer flows - #160

Merged
fpjentzsch merged 21 commits into
devfrom
new_transformers
Feb 6, 2026
Merged

fpjentzsch merged 21 commits into
devfrom
new_transformers

Conversation

@fpjentzsch

Copy link
Copy Markdown

Cherry-picks all Transformer-related changes from #126 to merge them as soon as possible. The remaining example model flows will be switched over to the new onnx-passes front-end at a later date.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

📋 Docstring Check Report

Checked files:

  • src/finn/benchmarking/bench.py
  • src/finn/benchmarking/bench_base.py
  • src/finn/builder/build_dataflow_steps.py
  • src/finn/builder/custom_step_library/transformer_adhoc.py
  • src/finn/builder/passes.py
  • src/finn/custom_op/fpgadataflow/hls/attention_hls.py
  • src/finn/interface/manage_deps.py
  • src/finn/templates/python_driver/driver.py
  • src/finn/transformation/fpgadataflow/convert_to_hw_layers.py
  • src/finn/transformation/fpgadataflow/make_driver.py

❌ Docstring check failed!

Missing Docstrings Details:

  • src/finn/benchmarking/bench.py
  • src/finn/benchmarking/bench_base.py
  • src/finn/builder/build_dataflow_steps.py
  • src/finn/builder/custom_step_library/transformer_adhoc.py
  • src/finn/builder/passes.py
  • src/finn/custom_op/fpgadataflow/hls/attention_hls.py
  • src/finn/interface/manage_deps.py
  • src/finn/templates/python_driver/driver.py
  • src/finn/transformation/fpgadataflow/convert_to_hw_layers.py
  • src/finn/transformation/fpgadataflow/make_driver.py

📄 src/finn/builder/custom_step_library/transformer_adhoc.py:

    • Line 1: module 'transformer_adhoc.py'
    • Line 50: function 'step_convert_to_hw'
    • Line 130: function '_set_folding_attention'
    • Line 172: function 'step_set_folding'

📄 src/finn/interface/manage_deps.py:

    • Line 153: function 'update_status'
    • Line 159: function 'pull_data'
    • Line 183: function 'pull_dep'
    • Line 219: function 'pull_board'

📄 src/finn/templates/python_driver/driver.py:

    • Line 881: function 'FINNLiveFIFOOverlay.ctrl_read'
    • Line 893: function 'FINNLiveFIFOOverlay.ctrl_write'

📄 src/finn/transformation/fpgadataflow/convert_to_hw_layers.py:

    • Line 2126: function 'InferHWSoftmax.init'
    • Line 2129: function 'InferHWSoftmax.apply'
    • Line 2164: function 'InferShuffle.init'
    • Line 2180: function 'InferShuffle.apply'
    • Line 2396: class 'InferReLUAsElementwiseMax'
    • Line 2400: function 'InferReLUAsElementwiseMax.reject_unsupported_dtypes'
    • Line 2401: function 'InferReLUAsElementwiseMax.dtype_ok'
    • Line 2417: function 'InferReLUAsElementwiseMax.init'
    • Line 2424: function 'InferReLUAsElementwiseMax.apply'
    • Line 2490: function 'InferLayerNorm.apply'
    • Line 2565: function 'elements_are_consecutive'
    • Line 2579: function 'InferCrop.init'
    • Line 2582: function 'InferCrop.apply'

Total missing docstrings: 23

How to Fix:

Please add docstrings to the missing functions, classes, and modules listed above.

Docstring Guidelines:

  • All modules should have a module-level docstring
  • All public functions and methods should have docstrings
  • All private functions should have docstrings
  • All classes should have docstrings
  • Use triple quotes (""") for docstrings
  • Follow PEP 257 conventions
Raw output from docstring checker
Checking 10 specified Python file(s) (excluding tests folder):
  - src/finn/benchmarking/bench.py
  - src/finn/benchmarking/bench_base.py
  - src/finn/builder/build_dataflow_steps.py
  - src/finn/builder/custom_step_library/transformer_adhoc.py
  - src/finn/builder/passes.py
  - src/finn/custom_op/fpgadataflow/hls/attention_hls.py
  - src/finn/interface/manage_deps.py
  - src/finn/templates/python_driver/driver.py
  - src/finn/transformation/fpgadataflow/convert_to_hw_layers.py
  - src/finn/transformation/fpgadataflow/make_driver.py

❌ Missing docstrings found:

📄 src/finn/builder/custom_step_library/transformer_adhoc.py:
  - Line 1: module 'transformer_adhoc.py'
  - Line 50: function 'step_convert_to_hw'
  - Line 130: function '_set_folding_attention'
  - Line 172: function 'step_set_folding'

📄 src/finn/interface/manage_deps.py:
  - Line 153: function 'update_status'
  - Line 159: function 'pull_data'
  - Line 183: function 'pull_dep'
  - Line 219: function 'pull_board'

📄 src/finn/templates/python_driver/driver.py:
  - Line 881: function 'FINNLiveFIFOOverlay.ctrl_read'
  - Line 893: function 'FINNLiveFIFOOverlay.ctrl_write'

📄 src/finn/transformation/fpgadataflow/convert_to_hw_layers.py:
  - Line 2126: function 'InferHWSoftmax.__init__'
  - Line 2129: function 'InferHWSoftmax.apply'
  - Line 2164: function 'InferShuffle.__init__'
  - Line 2180: function 'InferShuffle.apply'
  - Line 2396: class 'InferReLUAsElementwiseMax'
  - Line 2400: function 'InferReLUAsElementwiseMax.reject_unsupported_dtypes'
  - Line 2401: function 'InferReLUAsElementwiseMax.dtype_ok'
  - Line 2417: function 'InferReLUAsElementwiseMax.__init__'
  - Line 2424: function 'InferReLUAsElementwiseMax.apply'
  - Line 2490: function 'InferLayerNorm.apply'
  - Line 2565: function 'elements_are_consecutive'
  - Line 2579: function 'InferCrop.__init__'
  - Line 2582: function 'InferCrop.apply'

Total missing docstrings: 23

@fpjentzsch
fpjentzsch merged commit d022e09 into dev Feb 6, 2026
3 of 5 checks passed
@fpjentzsch
fpjentzsch deleted the new_transformers branch February 6, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant