• Kapil Krishnakumar's avatar
    consolidate deterministic settings · 573bd454
    Kapil Krishnakumar authored
    Summary:
    Pull Request resolved: https://github.com/facebookresearch/d2go/pull/644
    
    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.
    
    Reviewed By: wat3rBro
    
    Differential Revision: D51796739
    
    fbshipit-source-id: 50e44ea50b0311b56a885db9f633491ac3002bd4
    573bd454
setup.py 2.91 KB