Skip to content

Commit a934516

Browse files
committed
rename "init" -> "notify_pre_alloc"
1 parent 059b548 commit a934516

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/sglang/srt/disaggregation/conn.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ def _connect(self, endpoint: str):
384384
socket.connect(endpoint)
385385
return socket
386386

387-
def init(self, kv_indices: npt.NDArray[np.int64], aux_index: Optional[int] = None):
387+
def notify_pre_alloc(
388+
self, kv_indices: npt.NDArray[np.int64], aux_index: Optional[int] = None
389+
):
388390
self.kv_mgr.enqueue_request(self.bootstrap_room, kv_indices, aux_index)
389391
packed_kv_data_ptrs = b"".join(
390392
struct.pack("Q", ptr) for ptr in self.kv_mgr.kv_args.kv_data_ptrs

python/sglang/srt/disaggregation/decode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def pop_preallocated(self) -> List[DecodeRequest]:
195195
self.req_to_metadata_buffer_idx_allocator.alloc()
196196
)
197197
assert decode_req.metadata_buffer_index is not None
198-
decode_req.kv_receiver.init(kv_indices, decode_req.metadata_buffer_index)
198+
decode_req.kv_receiver.notify_pre_alloc(kv_indices, decode_req.metadata_buffer_index)
199199
preallocated_reqs.append(decode_req)
200200
indices_to_remove.add(i)
201201

0 commit comments

Comments
 (0)