Skip to content

Commit

Permalink
fix MIC-DKFZ#2219 by disabling torch.compile if the device is CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed May 28, 2024
1 parent 7141d4f commit 5549ead
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5549ead

Please sign in to comment.