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

[ExtractInstances] Append original instance name to path in metadata #7872

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

prithayan
Copy link
Contributor

Update the metadata generated by ExtractInstances.
Currently the path in the metadata, doesn't contain the original instance name, which causes difficulty in distinguishing extracted instances within the same module.
This PR updates the metadata to append the original instance name to the path.
Note that this instance name is of the instance, that has been extracted, hence it cannot be represented by the Hierarchical path.

@prithayan prithayan requested review from mikeurbach and removed request for seldridge and darthscsi November 21, 2024 21:48
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems straightforward to me.

@@ -1175,9 +1186,10 @@ void ExtractInstancesPass::createSchema() {
mlir::Type portsType[] = {
StringType::get(context), // name
PathType::get(context), // extracted instance path
StringType::get(context) // filename
StringType::get(context), // filename
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please call get once and reuse the value. Type uniquing has costs we don't need to pay here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this, fixed it.

@prithayan prithayan force-pushed the dev/pbarua/fixup_extract_instances_metadata branch from 8d58bdd to ec936ab Compare January 21, 2025 06:25
@prithayan
Copy link
Contributor Author

Thanks for the review, and Sorry for the delay in resolving this PR. I was waiting on some other changes to the client consuming the metadata files. Going to merge this after the CI passes.

@prithayan prithayan merged commit 77553d7 into main Jan 21, 2025
5 checks passed
@prithayan prithayan deleted the dev/pbarua/fixup_extract_instances_metadata branch January 21, 2025 14: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.

3 participants