From 00fca31c7904b0e3918e5c5e1a8667567491f9ae Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 25 Jul 2024 16:34:10 +0200 Subject: [PATCH] Call hook to set OMP_NUM_THREADS --- eessi/testsuite/tests/apps/PyTorch/PyTorch_torchvision.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eessi/testsuite/tests/apps/PyTorch/PyTorch_torchvision.py b/eessi/testsuite/tests/apps/PyTorch/PyTorch_torchvision.py index 37630970..f5922ca6 100644 --- a/eessi/testsuite/tests/apps/PyTorch/PyTorch_torchvision.py +++ b/eessi/testsuite/tests/apps/PyTorch/PyTorch_torchvision.py @@ -69,6 +69,9 @@ def apply_setup_hooks(self): # This is a hybrid test, binding is important for performance hooks.set_compact_process_binding(self) + # Set OMP_NUM_THREADS based on the number of cores per task + hooks.set_omp_num_threads(self) + @run_after('setup') def set_ddp_options(self): # Set environment variables for PyTorch DDP