Skip to content

Set Input and NIRGraph input_type based on first nodes in graph #40

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

fabio-innatera
Copy link
Collaborator

@fabio-innatera fabio-innatera commented Jun 25, 2025

This PR replaces #38.

For the new type inference in NIR (neuromorphs/NIR#153) to work, we need valid types in the Input nodes. This is what this PR does.

We initialize both Input and Output types to None, then use the code in this PR to update them in Input after we constructed the graph, and finally let the type inference in NIR update the Output type.

This PR currently targets the nir-update branch, because the changes there are needed to make this work.
This also means all the checks will probably fail, because our CI uses the published NIR version.

Copy link
Collaborator

@Jegp Jegp left a comment

Choose a reason for hiding this comment

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

This looks great! Setting the input type explicitly is exactly by going through the edges is what needs to happen.
The only problem is that a lot of the tests are now failing :) Do you have time to fix this or can we be of help somehow?

@fabio-innatera fabio-innatera force-pushed the nir-update branch 2 times, most recently from 2e9131c to 7d78fb0 Compare July 7, 2025 14:23
@fabio-innatera fabio-innatera force-pushed the infer-input-types branch 2 times, most recently from 2d01887 to 7e388aa Compare July 7, 2025 14:26
@fabio-innatera fabio-innatera changed the base branch from nir-update to main July 7, 2025 14:30
@fabio-innatera fabio-innatera merged commit 486d1cf into main Jul 7, 2025
15 checks passed
@fabio-innatera fabio-innatera deleted the infer-input-types branch July 7, 2025 14:37
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.

2 participants