Skip to content

Create a tensor de-duplication pass #66

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
justinchuby opened this issue Jun 5, 2025 · 4 comments · May be fixed by #67
Open

Create a tensor de-duplication pass #66

justinchuby opened this issue Jun 5, 2025 · 4 comments · May be fixed by #67

Comments

@justinchuby
Copy link
Member

Pass to deduplicate initializers (model weights)

@AbhishekHerbertSamuel
Copy link

Hi! I'd love to work on this as a first-time contributor. Could you please assign it to me?

@justinchuby
Copy link
Member Author

Please feel free to create a PR. You can create the file in https://github.com/onnx/ir-py/tree/main/src/onnx_ir/passes/common

@AbhishekHerbertSamuel
Copy link

Sure, will do so. Thank you:)

AbhishekHerbertSamuel added a commit to AbhishekHerbertSamuel/ir-py that referenced this issue Jun 5, 2025
@AbhishekHerbertSamuel
Copy link

Hi @justinchuby,

Thank you for creating this as a first-time contributor issue. I’ve submitted a PR here: #67 implementing the deduplication pass.

The logic aligns with the IR’s fingerprinting approach using (tobytes, dtype, shape) and updates graph nodes using replace_input_with(...). I’ve also documented the reasoning and structure inside the pass.

Looking forward to any feedback or suggestions you might have!

Best regards,
Abhishek

AbhishekHerbertSamuel added a commit to AbhishekHerbertSamuel/ir-py that referenced this issue Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants