Add srcB separate format from srcA to test infra.#1288
Open
uvelimirovicTT wants to merge 7 commits intomainfrom
Open
Add srcB separate format from srcA to test infra.#1288uvelimirovicTT wants to merge 7 commits intomainfrom
uvelimirovicTT wants to merge 7 commits intomainfrom
Conversation
Contributor
|
Thank you for your contribution! 🚀 |
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the LLK test infrastructure to support configuring separate data formats for src_A vs src_B (unpack_out), aligning tests and Python format-inference/header generation with the LLK C++ API capabilities.
Changes:
- Extend format configuration plumbing to carry distinct A/B input+output unpack formats through generated headers and
FormatConfig. - Update many C++ test kernels/perf kernels to call
_llk_unpack_hw_configure_withunpack_A_*andunpack_B_*instead of a singleunpack_*. - Update Python test infra and at least one Python test to exercise different formats for src_A vs src_B.
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/sources/unpack_untilize_test.cpp | Switch unpack hw configure/init to A/B-aware format fields. |
| tests/sources/unpack_untilize_perf.cpp | Switch unpack hw configure/init to A/B-aware format fields. |
| tests/sources/unpack_transpose_perf.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/unpack_tilize_test.cpp | Use A/B-aware formats for tilize init/execute. |
| tests/sources/unpack_tilize_sweep_test.cpp | Use A/B-aware formats for tilize init/execute. |
| tests/sources/unpack_tilize_perf.cpp | Use A/B-aware formats for tilize init/execute. |
| tests/sources/unpack_matmul_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/unpack_a_bcast_eltwise_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/unpack_a_bcast_eltwise_perf.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/unpack_A_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/transpose_dest_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/tilize_calculate_untilize_L1.cpp | Use A/B-aware formats for fused L1-to-L1 tilize passes. |
| tests/sources/sfpu_reduce_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/sfpu_reduce_sdpa_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/sfpu_reduce_sdpa_perf.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/sfpu_binary_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/reduce_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/reduce_perf.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/pack_untilize_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/pack_untilize_perf.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/pack_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/pack_rows_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/pack_dest_bank_test.cpp | Use A/B-aware formats and modernize integer types. |
| tests/sources/pack_dest_bank_perf.cpp | Use A/B-aware formats and modernize integer types. |
| tests/sources/multiple_tiles_eltwise_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/matmul_unpack_tilize_test.cpp | Use A/B-aware formats for tilize and reconfig paths. |
| tests/sources/matmul_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/matmul_perf.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/matmul_pack_untilize_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/matmul_and_unary_sfpu_test.cpp | Switch unpack hw configure/reconfig to A/B-aware format fields. |
| tests/sources/math_transpose_perf.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/math_matmul_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/fast_tilize_test.cpp | Switch unpack hw configure/init and block calls to A-aware formats. |
| tests/sources/eltwise_unary_sfpu_test.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/eltwise_unary_sfpu_perf.cpp | Use A/B-aware formats for HW config and unpack-A ops. |
| tests/sources/eltwise_unary_datacopy_test.cpp | Use A/B-aware formats for HW config/tilize path and unpack-A ops. |
| tests/sources/eltwise_binary_transpose_bcast_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/eltwise_binary_test.cpp | Switch unpack hw configure to A/B-aware format fields. |
| tests/sources/eltwise_binary_sfpu_perf.cpp | Use A/B-aware formats for HW config and unpack-A init/ops. |
| tests/sources/eltwise_binary_fpu_perf.cpp | Update unpack hw configure to A/B-aware format fields (but has a naming bug). |
| tests/python_tests/test_eltwise_binary.py | Exercise different src_A vs src_B input formats via InputOutputFormat. |
| tests/python_tests/helpers/test_config.py | Accept InputOutputFormat and plumb input_format_B into inference/header generation. |
| tests/python_tests/helpers/stimuli_config.py | Update stimuli header address sizing for separate A/B formats (but needs compatibility fixes). |
| tests/python_tests/helpers/fuser_config.py | Update outlier check call signature to include src_B (currently none). |
| tests/python_tests/helpers/format_config.py | Introduce InputOutputFormat with optional B input format (but has duplicate __str__/__repr__). |
| tests/python_tests/helpers/data_format_inference.py | Extend inference logic to handle separate A/B inputs and derive math/pack formats accordingly. |
| tests/helpers/include/params.h | Construct FormatConfig with explicit UNPACK_A/B IN/OUT values. |
| tests/helpers/include/data_format_inference.h | Expand FormatConfig to hold separate A/B unpack formats and update helper builder. |
Comments suppressed due to low confidence (1)
tests/python_tests/helpers/format_config.py:308
InputOutputFormatdefines__str__/__repr__twice. The later definitions overwrite the earlier ones, so the string representation will not include the newinput_Bdetail and the duplicates make the class harder to maintain. Please remove the duplicate methods and keep a single__str__/__repr__implementation (ideally the one that includes A/B/out).
def __str__(self):
return f"InputOutputFormat[A:{self.input},B:{self.input_B},out:{self.output}]"
def __repr__(self) -> str:
return self.__str__()
def __str__(self):
return f"InputOutputFormat[{self.input},{self.output}]"
def __repr__(self) -> str:
return self.__str__()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…sts to fit new formats struct names.
…s fields when formats is none in geneate_stimuli_header_addresses.
4008430 to
411bbc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem description
What's changed
Type of change
Heads up!