Skip to content

Commit edef63c

Browse files
committed
Revert "[MLIR] Fix thread safety of the deleter in PyDenseResourceElementsAttribute (llvm#124832)"
This reverts commit 28507ac.
1 parent 25892b8 commit edef63c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

mlir/lib/Bindings/Python/IRAttributes.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -1474,10 +1474,7 @@ class PyDenseResourceElementsAttribute
14741474
// The userData is a Py_buffer* that the deleter owns.
14751475
auto deleter = [](void *userData, const void *data, size_t size,
14761476
size_t align) {
1477-
if (!Py_IsInitialized())
1478-
Py_Initialize();
14791477
Py_buffer *ownedView = static_cast<Py_buffer *>(userData);
1480-
nb::gil_scoped_acquire gil;
14811478
PyBuffer_Release(ownedView);
14821479
delete ownedView;
14831480
};

0 commit comments

Comments
 (0)