Skip to content

Helpers for CMSSW emulation #1336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Helpers for CMSSW emulation #1336

wants to merge 5 commits into from

Conversation

jmitrevs
Copy link
Contributor

@jmitrevs jmitrevs commented Jul 18, 2025

Description

These features help in writing CMSSW emulators by providing a standardized way extract the inputs and outputs and call the hls4ml functions. Currently, it is only tested for io_parallel and for the Vitis backend. The emulation mode is requires convert_from_keras_model or more generally convert_from_*_model (though so far only tested with Keras) to have the following parameters set:

  namespace='hls4ml_model_emu_v1',
  write_weights_txt=False,
  write_emulation_constants=True,

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Currently only tested manually. Tests to be added.

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.

@jmitrevs
Copy link
Contributor Author

Instead of adding the extra type defintion in the defines.h and the extra interface in myproject.h when we have the write_emulation_constants flag set, we can also create a new emulation header. Does that seem better?

@jmitrevs jmitrevs marked this pull request as ready for review July 22, 2025 15:01
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