From 7718a1cd4f8e0b794c18a31ebd6353d6273c534e Mon Sep 17 00:00:00 2001 From: Hoa Dinh Date: Tue, 19 Mar 2024 20:01:33 +0000 Subject: [PATCH] T159183991: Error: EXC_SOFTWARE / SIGABRT at IGPyTorchFramework:-[MPSImageWrapperTrampoline endSynchronization:] (MPSImageWrapper.mm):cpp_exception_clas (#122132) Summary: Prevent crash by not throwing a C++ exception. Test Plan: spongebobsandcastle Reviewed By: SS-JIA Differential Revision: D55036050 Pull Request resolved: https://github.com/pytorch/pytorch/pull/122132 Approved by: https://github.com/SS-JIA --- aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm b/aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm index 14c98f99cff020..926a52ffb8d203 100644 --- a/aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm +++ b/aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm @@ -40,8 +40,7 @@ - (void)endSynchronization:(NSError*)error { if (_imageWrapper) { _imageWrapper->release(); } - // throw an exception with error details - METAL_THROW_IF_ERROR(error, "Command buffer execution failed!"); + // T159183991: ignore error. We prefer to not crash the app. } }