#0: Fix get_dispatch_core_config in conftest.py to not modify the device_params to not affect subsequent tests #16290
+19
−22
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.
Changed to a new function get_updated_device_params that returns a new updated copy of device_params instead
Ticket
Link to Github Issue
Problem description
get_dispatch_core_config
was modifying thedevice_params
dict in place by popping elements out of the dict for dispatch core axis. If we run 2 tests parametrized on core axis being col for example, the first test would see this set to col and pop it, but then the second test would see this set to the default (row), resulting in incorrect behaviour.What's changed
Changed
get_dispatch_core_config
toget_updated_device_params
which does not modify the originaldevice_params
dict, and instead returns a new copy with the updated parameters.Checklist