Skip to content

Commit 1bebabe

Browse files
authored
[Torch FX] Changes to Support OpenVINO Quantizer (#3579)
### Changes 1. Add method to set ignored scope in Weight Compression algorithm. ### Reason for changes 1. This is to allow the user of OpenVINO quantizer to set the ignored scope from the instance without passing it in the quantizer initialization.
1 parent b5c8916 commit 1bebabe

File tree

1 file changed

+8
-0
lines changed
  • src/nncf/quantization/algorithms/weight_compression

1 file changed

+8
-0
lines changed

src/nncf/quantization/algorithms/weight_compression/algorithm.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,14 @@ def __init__(
367367
def available_backends(self) -> list[BackendType]:
368368
return [BackendType.OPENVINO, BackendType.TORCH, BackendType.TORCH_FX]
369369

370+
def set_ignored_scope(self, ignored_scope: IgnoredScope) -> None:
371+
"""
372+
Set target ignored scope for the Weight Compression algorithm.
373+
374+
:param ignored_scope: The ignored scope to set to the Weight Compression algorithm.
375+
"""
376+
self._ignored_scope = ignored_scope
377+
370378
def set_backend_entity(self, model: TModel) -> None:
371379
"""
372380
Creates a helper class with a backed-specific logic of the algorithm.

0 commit comments

Comments
 (0)