Skip to content
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

[RTG][Elaboration] Treat randomized sequences as regular identity values #8389

Open
wants to merge 1 commit into
base: maerhart-rtg-issue-8193
Choose a base branch
from

Conversation

maerhart
Copy link
Member

@maerhart maerhart commented Apr 3, 2025

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.

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.
@maerhart maerhart added the RTG Involving the `rtg` dialect label Apr 3, 2025
@maerhart maerhart requested review from youngar and darthscsi April 3, 2025 17:25
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.

1 participant