diff --git a/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py b/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py index 15b26917c..4c179f172 100644 --- a/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py +++ b/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py @@ -237,6 +237,8 @@ def initialize(self): def _do_i_compile(self): # new default: compile is enabled! + if self.device == torch.device('cpu'): + return False if 'nnUNet_compile' not in os.environ.keys(): return True else: