Skip to content

HLS Layernorm#1506

Merged
auphelia merged 4 commits into
devfrom
feature/hls_layernorm
Jan 9, 2026
Merged

HLS Layernorm#1506
auphelia merged 4 commits into
devfrom
feature/hls_layernorm

Conversation

@auphelia
Copy link
Copy Markdown
Collaborator

@auphelia auphelia commented Jan 8, 2026

This PR integrates the HLS implementation of LayerNorm (from finn-hlslib). The HLS op accepts integer/quantized inputs and float inputs.

Selection behavior

  • Quantized inputs: the compiler automatically derives and selects the HLS LayerNorm.
  • Float inputs: selection depends on the target device.
    • Versal: RTL LayerNorm remains the default (uses DSP58).
    • Non‑Versal: HLS LayerNorm is selected (devices without DSP58).
  • You can explicitly prefer HLS on any target by setting preferred_impl_style="hls" on the HWCustomOp.

Notes

  • Output type remains float for both implementations.

@auphelia auphelia marked this pull request as ready for review January 9, 2026 14:38
@auphelia auphelia merged commit 12fd0be into dev Jan 9, 2026
2 checks passed
@auphelia auphelia deleted the feature/hls_layernorm branch January 9, 2026 16:43
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