speed optim

This commit is contained in:
Stardust·减
2023-09-04 14:27:14 +08:00
committed by GitHub
parent 51984c7648
commit 5914ed3efc

View File

@@ -40,6 +40,10 @@ torch.backends.cudnn.benchmark = True
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True
torch.set_float32_matmul_precision('medium')
torch.backends.cuda.sdp_kernel("flash")
torch.backends.cuda.enable_flash_sdp(True)
torch.backends.cuda.enable_mem_efficient_sdp(True)
torch.backends.cuda.enable_math_sdp(True)
global_step = 0