← Back to events
ActiveAIRelease

trunk/0ccbf972a39fc88cb17348079bca7332ef022bfc: [BE][MPS] Use `dispatch_sync_with_rethrow` (#196893)

What happened

A C++ exception thrown inside an Objective-C block passed to dispatch_sync aborts the process, as it unwinds into libdispatch's frame and ends up in std::terminate . dispatch_sync_with_rethrow exists precisely to avoid that, so use it if block can throw. Test Plan: python -c "import torch; torch.zeros(4, device='mps').clamp_min(1e40)" python -c "import torch; torch.nn.functional.hardshrink(torch.zeros(4, device='mps…

Summary assembled by rule from the sources below

Why it's spreading

Sources