Skip to content

Conversation

@rothej
Copy link
Contributor

@rothej rothej commented Jan 17, 2026

This fix adds the following helper methods in ModelWrapper:

global_in = model.get_first_global_in()
global_out = model.get_first_global_out()

This is meant to handle the following FINN issue: Xilinx/finn#1494

Once this PR is approved, can use the new commit hash in the FINN fix and remove the duplicate definitions from my FINN fix.

…r names

Signed-off-by: Joshua Rothe <joshrothe@gmail.com>
@rothej
Copy link
Contributor Author

rothej commented Jan 17, 2026

Want to make a note that all tests pass if I do NOT use multiple cores in parallel. Tests fail for both main branch and my branch (for tests unrelated to my fix) if I use pytest -n auto --verbose. All tests run fine if I don't use parallelism (pytest -p no:randomly and pytest --verbose both pass). I assume this is something the maintainers are aware of, but wanted to mention just in case.

@iksnagreb
Copy link
Collaborator

To avoid potential confusion: As ONNX models in general can have multiple inputs and outputs, would it make sense to explicitly name these methods get_first_global_in and get_first_global_out, as you are singling out the first one as special? Or what about get_first_input_name/get_first_output_name to reflect that this is referring to the tensor name and not the tensor itself?

@rothej
Copy link
Contributor Author

rothej commented Jan 23, 2026

I'm okay with whatever naming conventions make sense

@auphelia any input? I figure these'd have to match on the finn side as well

@auphelia
Copy link
Collaborator

auphelia commented Jan 26, 2026

Thanks for looping me in! I agree with @iksnagreb, making it explicit that this returns the first input and first output would help avoid confusion. Even if most FINN test cases currently only use a single input/output, it’s good to keep the naming clear, to avoid confusion in the future.
From my side, the proposed clarification sounds reasonable and consistent with how the function is used in @rothej's corresponding FINN PR. And yes, @rothej, you are right, the FINN PR would then need to be adjusted to use the new naming.

@rothej
Copy link
Contributor Author

rothej commented Jan 27, 2026

@auphelia @iksnagreb names fixed. pytest passes as before

@rothej rothej marked this pull request as draft January 27, 2026 04:53
@rothej rothej marked this pull request as ready for review January 27, 2026 04:55
@iksnagreb iksnagreb added this to the v1.0.0 milestone Jan 27, 2026
@jmitrevs jmitrevs merged commit 2199cc6 into fastmachinelearning:main Jan 29, 2026
3 checks passed
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.

4 participants