mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-02 14:00:45 +00:00
i think this is the new torch 2.9+ API for declaring tf32 preference
This commit is contained in:
parent
067daa7758
commit
d6c4f3b923
|
|
@ -170,7 +170,7 @@ def compute_init(device_type="cuda"): # cuda|cpu|mps
|
|||
|
||||
# Precision
|
||||
if device_type == "cuda":
|
||||
torch.backends.cuda.matmul.fp32_precision = "tf32" # uses tf32 instead of fp32 for matmuls
|
||||
torch.backends.fp32_precision = "tf32" # uses tf32 instead of fp32 for matmuls
|
||||
|
||||
# Distributed setup: Distributed Data Parallel (DDP), optional, and requires CUDA
|
||||
is_ddp_requested, ddp_rank, ddp_local_rank, ddp_world_size = get_dist_info()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user