Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit c7c5e65

Browse files
authored
Remove distribution check from threaded mode (#313)
1 parent 6b7ade3 commit c7c5e65

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

sdc/tests/test_utils.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
# *****************************************************************************
23
# Copyright (c) 2019, Intel Corporation All rights reserved.
34
#
@@ -37,15 +38,21 @@
3738

3839

3940
def count_array_REPs():
40-
from sdc.distributed import Distribution
41-
vals = sdc.distributed.dist_analysis.array_dists.values()
42-
return sum([v == Distribution.REP for v in vals])
41+
if sdc.config.config_pipeline_hpat_default:
42+
from sdc.distributed import Distribution
43+
vals = sdc.distributed.dist_analysis.array_dists.values()
44+
return sum([v == Distribution.REP for v in vals])
45+
else:
46+
return 0
4347

4448

4549
def count_parfor_REPs():
46-
from sdc.distributed import Distribution
47-
vals = sdc.distributed.dist_analysis.parfor_dists.values()
48-
return sum([v == Distribution.REP for v in vals])
50+
if sdc.config.config_pipeline_hpat_default:
51+
from sdc.distributed import Distribution
52+
vals = sdc.distributed.dist_analysis.parfor_dists.values()
53+
return sum([v == Distribution.REP for v in vals])
54+
else:
55+
return 0
4956

5057

5158
def count_parfor_OneDs():

0 commit comments

Comments
 (0)