Skip to content

Commit

Permalink
Move cudnn deterministic in eval
Browse files Browse the repository at this point in the history
  • Loading branch information
bhack authored Mar 21, 2024
1 parent 082ac0f commit b6110d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchbenchmark/models/pytorch_unet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from torch import optim
from typing import Tuple

torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False

from .pytorch_unet.unet import UNet
Expand Down Expand Up @@ -89,6 +88,7 @@ def jit_callback(self):
self.model = torch.jit.script(self.model)

def eval(self) -> Tuple[torch.Tensor]:
torch.backends.cudnn.deterministic = True
self.model.eval()
with torch.no_grad():
with torch.cuda.amp.autocast(enabled=self.args.amp):
Expand Down

0 comments on commit b6110d3

Please sign in to comment.