Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Feb 3, 2025
1 parent ec2ec80 commit 11ded0b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nncf/quantization/algorithms/smooth_quant/torch_fx_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
from nncf.experimental.torch.fx.transformations import constant_update_transformation_builder
from nncf.experimental.torch.fx.transformations import get_graph_node_by_name
from nncf.experimental.torch.fx.transformations import module_insertion_transformation_builder
from nncf.openvino.graph.transformations.commands import OVMultiplyInsertionCommand
from nncf.openvino.graph.transformations.commands import OVWeightUpdateCommand
from nncf.quantization.algorithms.smooth_quant.backend import SmoothQuantAlgoBackend
from nncf.tensor import Tensor
from nncf.torch.graph.transformations.commands import PTTargetPoint
Expand Down Expand Up @@ -106,7 +104,7 @@ def get_weight_value(node_with_weight: NNCFNode, model: torch.fx.GraphModule, nn
return Tensor(weight_data.data)

@staticmethod
def weight_update_command(node_with_weight: NNCFNode, weight_value: torch.Tensor) -> OVWeightUpdateCommand:
def weight_update_command(node_with_weight: NNCFNode, weight_value: torch.Tensor) -> FXApplyTransformationCommand:
# TODO(dlyakhov): Use input port id depending on the node metatype/attributes.
return FXApplyTransformationCommand(
constant_update_transformation_builder(node_with_weight, weight_value.data, input_port_id=1)
Expand All @@ -119,7 +117,7 @@ def scale_insertion_command(
source_output_port_id: int,
nodes: List[NNCFNode],
scale_node_name: str,
) -> OVMultiplyInsertionCommand:
) -> FXApplyTransformationCommand:
input_port_id = 0
target_points = []
for node in nodes:
Expand Down

0 comments on commit 11ded0b

Please sign in to comment.