Merged
Conversation
added 14 commits
March 12, 2025 13:46
added 2 commits
March 17, 2025 11:22
ofirgo
suggested changes
Mar 17, 2025
| input_shape=nodes[0].input_shape, | ||
| output_shape=nodes[-1].output_shape, | ||
| weights={}, | ||
| weights={}, # TODO: update with weights of all nodes |
Contributor
There was a problem hiding this comment.
Is the todo here planned for this PR?
is it necessary actually? because you can always retrieve the original weights from the original graph
Contributor
Author
There was a problem hiding this comment.
No, in the PR that handles the MP.
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_facade.py
Outdated
Show resolved
Hide resolved
model_compression_toolkit/core/common/substitutions/batchnorm_reconstruction.py
Outdated
Show resolved
Hide resolved
ofirgo
suggested changes
Mar 18, 2025
Contributor
ofirgo
left a comment
There was a problem hiding this comment.
consider adding an e2e tests to verify that none of our substitutions fails the fusing metadata.
tests/keras_tests/function_tests/test_activation_weights_composition_substitution.py
Outdated
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Outdated
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Outdated
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Show resolved
Hide resolved
added 9 commits
March 26, 2025 17:02
ofirgo
suggested changes
Mar 27, 2025
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_facade.py
Outdated
Show resolved
Hide resolved
tests/keras_tests/function_tests/test_activation_weights_composition_substitution.py
Outdated
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/fusing/base_fusing_info_generator_test.py
Show resolved
Hide resolved
tests_pytest/_fw_tests_common_base/base_graph_with_fusion_metadata_test.py
Outdated
Show resolved
Hide resolved
added 12 commits
April 1, 2025 14:29
ofirgo
reviewed
Apr 2, 2025
model_compression_toolkit/core/common/mixed_precision/mixed_precision_search_facade.py
Show resolved
Hide resolved
ofirgo
approved these changes
Apr 2, 2025
lior-dikstein
pushed a commit
that referenced
this pull request
Apr 8, 2025
This commit introduces handling graph fusion by encapsulating fusion metadata in the graph. This ensures that after access to the graph that modify the graph, a validation check is performed to verify that the fusion information remains consistent and that no modifications have introduced inconsistencies. Additionally, the fusion-related logic has been refactored into a new class called GraphFuser, which takes the graph along with its fusion metadata and creates a new graph where fused operations are represented as single nodes. --------- Co-authored-by: reuvenp <reuvenp@altair-semi.com>
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.
Pull Request Description:
This PR introduces handling graph fusion by encapsulating fusion metadata within a new wrapper class for the graph. This class ensures that after every access to the graph, a validation check is performed to verify that the fusion information remains consistent and that no modifications have introduced inconsistencies. Additionally, the fusion-related logic has been refactored into a new class called
GraphFuser, which takes the graph along with its fusion metadata and creates a new graph where fused operations are represented as single nodes.Checklist before requesting a review: