Skip to content

Commit

Permalink
Use num_ranking_processes = 1 for Windows (#2095)
Browse files Browse the repository at this point in the history
### Changes

Use num_ranking_processes = 1 for Windows

### Reason for changes

num_ranking_processes > 1 leads to the error of
nncf.qunatize_with_accuracy_control(...) on Windows:

### Related tickets

ref:118321

### Tests

N/A
  • Loading branch information
alexsu52 authored Sep 1, 2023
1 parent 8a01b01 commit 9c30388
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nncf/quantization/algorithms/accuracy_control/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from nncf.common.utils.backend import get_backend
from nncf.common.utils.os import get_available_cpu_count
from nncf.common.utils.os import get_available_memory_amount
from nncf.common.utils.os import is_windows
from nncf.data.dataset import Dataset
from nncf.parameters import DropType
from nncf.quantization.algorithms.accuracy_control.backend import AccuracyControlAlgoBackend
Expand Down Expand Up @@ -161,7 +162,16 @@ def __init__(
self.max_num_iterations = max_num_iterations
self.max_drop = max_drop
self.drop_type = drop_type
self.num_ranking_processes = num_ranking_processes

if is_windows():
self.num_ranking_processes = 1
if num_ranking_processes is not None and num_ranking_processes > 1:
nncf_logger.info(
"Number of parallel processes to rank quantized operations > 1 is not supported on Windows OS. "
"num_ranking_processes = 1 will be used."
)
else:
self.num_ranking_processes = num_ranking_processes

def apply(
self,
Expand Down

0 comments on commit 9c30388

Please sign in to comment.