torchmd / torchmd-net

Training neural network potentials
MIT License
326 stars 73 forks source link

Disable TF32 usage by default #327

Closed RaulPPelaez closed 4 months ago

RaulPPelaez commented 4 months ago

Tensornet enables tf32 by default. We find these affect the accuracy too greatly in some situations so I am disabling them out of caution (which is the default in pytorch). User code can request TF32 usage by writing this after importing torch:

torch.set_float32_matmul_precision("high")
torch.backends.cuda.matmul.allow_tf32 = True