Skip to content

Improve test_conv1d layer checks for io_stream + same padding#1479

Open
frabazz wants to merge 2 commits into
fastmachinelearning:mainfrom
frabazz:better_conv1d_test
Open

Improve test_conv1d layer checks for io_stream + same padding#1479
frabazz wants to merge 2 commits into
fastmachinelearning:mainfrom
frabazz:better_conv1d_test

Conversation

@frabazz
Copy link
Copy Markdown

@frabazz frabazz commented May 22, 2026

Description

Previously, test_conv1d skipped all layer-name and layer-property assertions whenever the backend was Vivado/Vitis with io_type='io_stream' and padding='same'. In that configuration Vivado/Vitis inserts an extra padding layer after the input, which shifts every subsequent layer index by one.

Instead of skipping the checks entirely, this PR introduces an index offset off (1 in that specific case, 0 otherwise) so that all layers except the inserted padding layer are still validated. The padding layer itself is not checked because it lacks attributes such as name.

As a result, layer-name and property checks now also run in the io_stream + same configuration, restoring coverage that was previously dropped.

Type of change

Note: Please delete options that are not relevant.

  • Other (Specify): Test coverage improvement

Tests

The updated test_conv1d passes correctly in all configurations, including Vivado/Vitis with io_type='io_stream' and padding='same'.

Checklist

  • I have read the guidelines for contributing.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have installed and run pre-commit on the files I edited or added.
  • I have added tests that prove my fix is effective or that my feature works.

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