Skip to content

Commit 2cd3d36

Browse files
committed
use a quarter of the cores when building PyTorch
1 parent c9d60c6 commit 2cd3d36

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eb_hooks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ def post_module_hook(self, *args, **kwargs):
12481248
}
12491249

12501250
POST_MODULE_HOOKS = {}
1251-
1251+
Torch
12521252
# Define parallelism limit operations
12531253
def divide_by_factor(parallel, factor):
12541254
"""Divide parallelism by given factor"""
@@ -1272,6 +1272,9 @@ def set_maximum(parallel, max_value):
12721272
'MBX': {
12731273
'*': (divide_by_factor, 2),
12741274
},
1275+
'PyTorch': {
1276+
CPU_TARGET_A64FX: (divide_by_factor, 4),
1277+
},
12751278
'TensorFlow': {
12761279
'*': (divide_by_factor, 2),
12771280
CPU_TARGET_A64FX: (set_maximum, 8),

0 commit comments

Comments
 (0)