Skip to content

Conversation

fabio-innatera
Copy link
Collaborator

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

This is based on the discussion in #36.

The code in torch_tracer.py sets the input_type shape of the Input nodes to a dummy value (array[1]), this PR updates this value after the graph has been constructed and we know which nodes follow the input node.

My current idea is that type inference for the Input node happens here in NIRTorch, while the type inference for the Output node happens in NIR itself, in _forward_type_inference.

See neuromorphs/NIR#140 for that change.

Edit: Force push to format code with ruff, updated code comment.

@fabio-innatera fabio-innatera force-pushed the infer-input-types branch 2 times, most recently from 39b6ef9 to 6b79632 Compare June 11, 2025 16:43
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.

Excellent changes, thank you.

As per our discussion, let's defer this to after the changes in NIR, where the type inference and type checking has been merged into one.

@fabio-innatera
Copy link
Collaborator Author

Replaced by #40.

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