Skip to content

Commit bd3afe1

Browse files
committed
Update on "update cuda delegate resource free pipeline for safety and segfault-free"
This diff survives `clear_all_tensors()` function and enable it during backend destroy stage. Furthermore, we defer the container handle deletion to OS to avoid potential segfault if there's more than one .so files. Differential Revision: [D84135792](https://our.internmc.facebook.com/intern/diff/D84135792/) [ghstack-poisoned]
2 parents a9a8f63 + f2b0da3 commit bd3afe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/cuda/runtime/cuda_backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class ET_EXPERIMENTAL CudaBackend final
323323
if (!handle->so_path.empty()) {
324324
std::error_code remove_error;
325325
std::filesystem::remove(handle->so_path, remove_error);
326-
ET_CHECK_OR_LOG(
326+
ET_CHECK_OR_LOG_ERROR(
327327
!remove_error,
328328
"Failed to remove temporary shared library %s: %s",
329329
handle->so_path.c_str(),

0 commit comments

Comments
 (0)