File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ FetchContent_MakeAvailable(repo-common repo-core repo-backend)
7474FetchContent_Declare(
7575 pybind11
7676 GIT_REPOSITORY "https://github.com/pybind/pybind11"
77- GIT_TAG "v2.6 "
77+ GIT_TAG "v2.10 "
7878 GIT_SHALLOW ON
7979)
8080FetchContent_MakeAvailable(pybind11)
@@ -85,7 +85,7 @@ FetchContent_MakeAvailable(pybind11)
8585FetchContent_Declare(
8686 dlpack
8787 GIT_REPOSITORY "https://github.com/dmlc/dlpack"
88- GIT_TAG "v0.5 "
88+ GIT_TAG "v0.7 "
8989 GIT_SHALLOW ON
9090)
9191FetchContent_MakeAvailable(dlpack)
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ PbTensor::ToDLPack()
247247 dlpack_tensor->dl_tensor .strides = nullptr ;
248248 dlpack_tensor->manager_ctx = this ;
249249 dlpack_tensor->deleter = [](DLManagedTensor* m) {
250+ // We need to acquire GIL since the framework that deleted the dlpack tensor
251+ // may not have acquired GIL when calling this function.
252+ py::gil_scoped_acquire gil;
250253 if (m->manager_ctx == nullptr ) {
251254 return ;
252255 }
You can’t perform that action at this time.
0 commit comments