Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQ algorithm ports usage #2672

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nncf/quantization/algorithms/smooth_quant/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def apply(
weight_update_command = self._backend_entity.weight_update_command(node_to_smooth, scaled_weight.data)
transformation_layout.register(weight_update_command)

activations_shape = graph.get_output_edges(source_node)[source_output_port_id].tensor_shape
alexsu52 marked this conversation as resolved.
Show resolved Hide resolved
activations_by_output_id = {e.output_port_id: e for e in graph.get_output_edges(source_node)}
activations_shape = activations_by_output_id[source_output_port_id].tensor_shape
activation_scale = self._calculate_activation_scale(best_scale, activations_shape, nodes, graph)

scale_node_name = self._create_scale_node_name(source_node.node_name, source_output_port_id)
Expand Down
Loading