Skip to main content

detect_anomaly(True): The Hidden PyTorch Performance Killer

·41 words·1 min

After spending 2 days of intense debugging why my PyTorch code was running 6X slower finally found cause: an innocuous little statement I’d left in: torch.autograd.set_detect_anomaly(True). In other news py-spy and timebudget are just fantastic and essential perf debugging tools!

Discussion