Open
Conversation
Author
|
@Victor-Jung tagging you for visibility |
Victor-Jung
reviewed
Jan 12, 2026
Member
Victor-Jung
left a comment
There was a problem hiding this comment.
Hi Jan, these changes look good and are very useful. I ran the tests locally and got several errors (see below). Are you locally passing tests this current HEAD?
FAILED Tests/TestConvChannelWise.py::deepQuantTestConv - RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
FAILED Tests/TestMHSA.py::deepQuantTestMHSA - AttributeError: 'IntQuantTensor' object has no attribute 'sum'
FAILED Tests/TestSimpleCNNChannelWise.py::deepQuantTestSimpleCNN - RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider making it a parameter or input, or detaching the gradient
Comment on lines
+79
to
+81
| if arg is None or not isinstance(arg, fx.Node): | ||
| newLinArgs.append(arg) | ||
| continue |
Member
There was a problem hiding this comment.
Maybe we could display a warning when an arg is None or non-node. I'm just scared that this change backfire at some point.
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Federico Brancasi <fbrancasi@ethz.ch> |
Member
There was a problem hiding this comment.
You deserve the authorship of this test 😁
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Victor Jung <jungvi@iis.ee.ethz.ch> | ||
| # Federico Brancasi <fbrancasi@ethz.ch> |
Member
There was a problem hiding this comment.
You deserve the authorship of this test 😁
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.
This PR fixes multiple bugs:
This adds a basic check on the shape of the scaling factor tensor, and only converts to a scalar if the tensor has only 1 element.
Added single Conv layer and simple CNN with channel-wise weights quantization models to the tests to validate.
Added support for 1-level nested node arguments.
Fixed the implementation to always return a tuple, with the value of the attention weights or None, depending on the provided option.