mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[CI] Avoid calling torch.use_deterministic_algorithms for some models (#96245)
tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/96245 Approved by: https://github.com/davidberard98
This commit is contained in:
parent
93ff71ec37
commit
664381b293
1 changed files with 7 additions and 1 deletions
|
|
@ -1986,7 +1986,13 @@ def run(runner, args, original_dir=None):
|
|||
# TODO - Using train mode for timm_models. Move to train mode for HF and Torchbench as well.
|
||||
args.use_eval_mode = True
|
||||
inductor_config.fallback_random = True
|
||||
torch.use_deterministic_algorithms(True)
|
||||
if args.only is not None and args.only not in {
|
||||
"pytorch_CycleGAN_and_pix2pix",
|
||||
"pytorch_unet",
|
||||
"Super_SloMo",
|
||||
}:
|
||||
# some of the models do not support use_deterministic_algorithms
|
||||
torch.use_deterministic_algorithms(True)
|
||||
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"
|
||||
torch.backends.cudnn.deterministic = True
|
||||
torch.backends.cudnn.allow_tf32 = False
|
||||
|
|
|
|||
Loading…
Reference in a new issue