Skip to content

Commit d49794d

Browse files
ketorrock-git
authored andcommitted
[fix][index] Limit openblas threads num.
Signed-off-by: Ketor <[email protected]>
1 parent dd50393 commit d49794d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/server/main.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ DEFINE_int32(version_service_worker_num, 10, "service worker num");
100100
DEFINE_int64(version_service_worker_max_pending_num, 0, "service worker num");
101101

102102
extern "C" {
103+
extern void goto_set_num_threads(int num_threads); // NOLINT
103104
extern void openblas_set_num_threads(int num_threads); // NOLINT
104105
}
105106

@@ -811,6 +812,7 @@ int main(int argc, char *argv[]) {
811812

812813
#ifdef USE_OPENBLAS
813814
DINGO_LOG(INFO) << "USE_OPENBLAS is ON";
815+
goto_set_num_threads(1);
814816
openblas_set_num_threads(1);
815817
#endif
816818

0 commit comments

Comments
 (0)