facebookresearch / d2go

D2Go is a toolkit for efficient deep learning
Apache License 2.0
837 stars 200 forks source link

consolidate deterministic settings #644

Closed krishnakumar-kapil closed 8 months ago

krishnakumar-kapil commented 9 months ago

Summary: This diff consolidates deterministic settings in D2Go. In the default_runner.py file, the torch.set_float32_matmul_precision("highest") function is added to set the precision for matrix multiplication to the highest possible value. In the setup.py file, the torch.backends.cudnn.deterministic setting is set to True and the torch.backends.cudnn.allow_tf32 setting is set to False to avoid random pytorch and CUDA algorithms during the training. The torch.backends.cuda.matmul.allow_tf32 setting is also set to False to avoid random matrix multiplication algorithms. Additionally, the seed function is used to set the seed for reproducibility.

Differential Revision: D51796739

facebook-github-bot commented 9 months ago

This pull request was exported from Phabricator. Differential Revision: D51796739

facebook-github-bot commented 8 months ago

This pull request has been merged in facebookresearch/d2go@573bd454c135a9b950943eec33d43380b41c64f2.