Skip to content

Commit

Permalink
Remove multiprocessing as well
Browse files Browse the repository at this point in the history
The .nthreads attribute is then set to 0, to avoid the default coming from the abstract (currently 1), since TensorFlow will use multiple threads by default
  • Loading branch information
alecandido committed Dec 5, 2023
1 parent 6779553 commit 9ce8313
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/qibo/backends/tensorflow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import collections
import multiprocessing
import os

import numpy as np
Expand Down Expand Up @@ -196,7 +195,7 @@ def __init__(self):
elif cpu_devices:
self.device = cpu_devices[0].name

self.nthreads = multiprocessing.cpu_count()
self.nthreads = 0

self.tensor_types = (np.ndarray, tf.Tensor, tf.Variable)

Expand Down

0 comments on commit 9ce8313

Please sign in to comment.