Skip to content

[PyRTG] Refactor targets/configs #8399

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 11 commits into
base: main
Choose a base branch
from

Conversation

maerhart
Copy link
Member

@maerhart maerhart commented Apr 7, 2025

  • Rename target -> config and entry -> param in PyRTG and make param declaration in a config as well as test argument declaration more convenient
  • rename 'type' staticmethod to 'ty' to avoid confusion with the builtin 'type' which can make debugging annoying in some cases
  • Support 'Value' attributes in classes when passing them across control-flow regions
  • Fix a bug in Elaboration discovered during this refactoring
  • Fix a bug in InlineSequences discovered during this refactoring
  • This also fixes an issue where the test/target arguments weren't sorted properly

@maerhart maerhart added the RTG Involving the `rtg` dialect label Apr 7, 2025
@maerhart maerhart requested review from youngar and darthscsi April 7, 2025 14:56
maerhart added 10 commits May 12, 2025 08:57
Currently we special-case randomized sequences. This PR changes them to be values with identity. This has the advantage that we don't need to generate a new, unique name for each randomizes sequence from the start, i.e., if we randomize 1000 sequences, put them in a set and only select 1 at random and embed it, then we only need to generate 1 name after this PR instead of 1000. This name uniquification made up a considerable chunk of runtime in some previous profiling. On the negative side, we now pass randomized sequence values as block arguments to nested sequences which makes life a bit more difficult for sequence inlining. Not sure if avoiding this is worth the special-casing.
Also make sure memories are properly retained during elaboration and add a load address instruction to rtgtest
@maerhart maerhart force-pushed the maerhart-pyrtg-refactor-for-easier-downstream-inclusion branch from 97c44af to 7fd03e8 Compare May 12, 2025 09:59
@maerhart maerhart force-pushed the maerhart-pyrtg-target-refactoring branch from a9e0b93 to 640ac16 Compare May 12, 2025 10:08
@maerhart maerhart requested a review from rwy7 May 12, 2025 10:08
@maerhart maerhart force-pushed the maerhart-pyrtg-refactor-for-easier-downstream-inclusion branch from 7fd03e8 to 7425afe Compare May 14, 2025 10:20
Base automatically changed from maerhart-pyrtg-refactor-for-easier-downstream-inclusion to main May 14, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RTG Involving the `rtg` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants