Skip to content
RED SAGSkills
easy5 pts · first answer countsgpu-computingmixed-precision

What autocast does

What happens to operations inside a torch.autocast(device_type="cuda", dtype=torch.bfloat16) block?

with torch.autocast(device_type="cuda", dtype=torch.bfloat16):
    logits = model(x)
    loss = loss_fn(logits, y)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions