Skip to content

Commit 46ea81f

Browse files
changed thread handling
set intra and inter op parallelism to number of threads to get cpu usage closer to target number of cores
1 parent cf357f3 commit 46ea81f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

batchglm/pkg_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
TF_CONFIG_PROTO.gpu_options.allow_growth = True
2323
TF_CONFIG_PROTO.graph_options.optimizer_options.global_jit_level = tf.OptimizerOptions.ON_1
2424

25-
TF_CONFIG_PROTO.inter_op_parallelism_threads = 0 if TF_NUM_THREADS == 0 else 1
25+
TF_CONFIG_PROTO.inter_op_parallelism_threads = TF_NUM_THREADS
2626
TF_CONFIG_PROTO.intra_op_parallelism_threads = TF_NUM_THREADS
2727

2828
if TF_NUM_THREADS == 0:

0 commit comments

Comments
 (0)