This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch tirx/standalone-package-cleanup in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 33920a5adc3224d0d27b29329c8172f216305050 Author: Tianqi Chen <[email protected]> AuthorDate: Thu Oct 15 07:42:22 2026 +0000 [FIX][Runtime] Release the GIL while connecting Disco socket sessions --- python/tvm/runtime/disco/session.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/python/tvm/runtime/disco/session.py b/python/tvm/runtime/disco/session.py index 6188600ca7..a658ebd165 100644 --- a/python/tvm/runtime/disco/session.py +++ b/python/tvm/runtime/disco/session.py @@ -615,13 +615,12 @@ class SocketSession(Session): host: str, port: int, ) -> None: - self.__init_handle_by_constructor__( - _ffi_api.SocketSession, # type: ignore # pylint: disable=no-member - num_nodes, - num_workers_per_node, - num_groups, - host, - port, + # Connecting remote nodes can block. A regular FFI call releases the GIL + # so another Python thread can launch them; constructor calls retain it. + self.__move_handle_from__( + _ffi_api.SocketSession( # type: ignore # pylint: disable=no-member + num_nodes, num_workers_per_node, num_groups, host, port + ) )
