Skip to content

Commit ad6fa2e

Browse files
authored
fix: numpy can have too many threads(#156)
1 parent f2dc855 commit ad6fa2e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

infinistore/lib.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
import asyncio
88
from functools import singledispatchmethod
99
from typing import Optional, Union, List, Tuple
10+
11+
os.environ["OPENBLAS_NUM_THREADS"] = "1"
12+
os.environ["MKL_NUM_THREADS"] = "1"
13+
os.environ["NUMEXPR_NUM_THREADS"] = "1"
14+
os.environ["OMP_NUM_THREADS"] = "1"
1015
import numpy as np
1116

1217

0 commit comments

Comments
 (0)