Skip to content

Reject unsupported Conv1D dilation during conversion - #1521

Merged
JanFSchulte merged 2 commits into
fastmachinelearning:mainfrom
ShreyanshGoyal:fix/reject-conv1d-dilation
Aug 11, 2026
Merged

Reject unsupported Conv1D dilation during conversion#1521
JanFSchulte merged 2 commits into
fastmachinelearning:mainfrom
ShreyanshGoyal:fix/reject-conv1d-dilation

Conversation

@ShreyanshGoyal

Copy link
Copy Markdown
Contributor

Summary

  • reject unsupported Keras Conv1D dilation rates during conversion
  • report the layer name and requested dilation rate in the error
  • add a converter regression test for dilation rate 2

Rationale

The Keras converter currently ignores dilation_rate, while the generated Conv1D implementation uses dilation 1. Conversion therefore succeeds but can produce hardware whose computation differs from the source model. Failing early prevents silent incorrect output until dilated Conv1D is implemented.

Fixes #1508.

Test plan

  • python -m pytest -q test/pytest/test_keras_converter.py
  • python -m pre_commit run --files hls4ml/converters/keras/convolution.py test/pytest/test_keras_converter.py
  • git diff --check

@JanFSchulte JanFSchulte added please test Trigger testing by creating local PR branch bugfix labels Aug 10, 2026
Comment thread hls4ml/converters/keras/convolution.py Outdated
@JanFSchulte JanFSchulte added please test Trigger testing by creating local PR branch and removed please test Trigger testing by creating local PR branch labels Aug 11, 2026
@JanFSchulte
JanFSchulte merged commit d355942 into fastmachinelearning:main Aug 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix please test Trigger testing by creating local PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conv1D dilation_rate is silently ignored — generated firmware is identical for dilation_rate 1, 2 and 4

2 participants