Fixing size parameter handling in len-mechanism to handle function parameters with different size parameters #2138
+162
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've updated CHANGELOG.md if applicable.What does this Pull Request accomplish?
Fixes the codegen to properly handle functions with multiple array parameters that reference different size parameters:
Updates
metadata_filters.py: Refactors thefilter_parametersfunction to collect all size parameter names referenced by len-sized parameters into alen_size_parameter_names, replacing the previous singlelen_size_parameterapproach. Removed assert to check if all size parameters are same fromfilter_len_parameters. Following this updated var names indefault_method.py.makoandinitialization_method.py.makoto reflect multiple possible size params.Updates to nifake to enable testing: Details covered in testing section
Previously, it was assumed all len-mechanism arrays in a function shared the same size parameter. This change enables functions like
CreateDeembeddingSparameterTableArrayin NI-RFSG wherefrequenciesusesfrequenciesSizeandsparameterTableusessparameterTableSize.List issues fixed by this Pull Request below, if any.
Issue 2137: Fix size parameter handling for functions with parameters referencing multiple size parameters.
Additional PR needs to be raised to update NI-RFSG function metadata (CreateDeembeddingSparameterTableArray) to consume
these changes.
What testing has been done?
MultipleArraysDifferentSizefunction to nifake metadata with two arrays (valuesArrayusingvaluesArraySize, anddataArrayusingdataArraySize) to test the change in filter param logictest_multiple_arrays_different_sizeintest_library_interpreter.pythat verifies correct handling of multiple arrays with independent size parametersvaluesArraywithvaluesArraySize, and 5 elements fordataArraywithdataArraySize)