trunk/69465889df3652d30e76a251b59eb87ad25f261b: [symm_mem] Don't throw from AllocationRef destructor (#196003)
- PyTorch: 661 events in the last 90 days
- PyTorch: 652th Release in the last 90 days
- Previous: earlier the same day · trunk/561235528a68e1174b45f96a3f5b0402d313fe92: [dynamo] Port CPython 3.13 test_userstring tests (#196306)
What happened
Fixes #195824 AllocationRef::~AllocationRef calls C10_CUDA_CHECK / C10_CUDA_DRIVER_CHECK , which throw. A destructor is implicitly noexcept, so when cleanup fails — typically because the CUDA context is already broken after an unrelated failure — the process dies with std::terminate and the original error is masked. Switch the cleanup to the _WARN macro variants (already used elsewhere in this file) and wrap the rem…
Summary assembled by rule from the sources below