-
Notifications
You must be signed in to change notification settings - Fork 1.2k
【0.13.0】【bugfix】Resolved memory deallocation failure in the pooling layer under re-computation workloads. #6056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -116,6 +116,11 @@ def add_stored_request(self, req_id: str): | |||||||||||||
| with self.done_task_lock: | ||||||||||||||
| self.stored_requests[req_id] += 1 | ||||||||||||||
|
|
||||||||||||||
| def dec_stored_request(self, req_id: str): | ||||||||||||||
| with self.done_task_lock: | ||||||||||||||
| if req_id in self.stored_requests: | ||||||||||||||
| self.stored_requests[req_id] -= 1 | ||||||||||||||
|
|
||||||||||||||
| def delete_finished_stored_request(self, req_id: str): | ||||||||||||||
| with self.done_task_lock: | ||||||||||||||
| if req_id in self.stored_requests: | ||||||||||||||
|
|
@@ -129,6 +134,10 @@ def _handle_request(self, req_meta: ReqMeta): | |||||||||||||
| starts = [] | ||||||||||||||
| ends = [] | ||||||||||||||
| keys = [] | ||||||||||||||
| if req_id not in self.stored_requests: | ||||||||||||||
| self.request_queue.task_done() | ||||||||||||||
| return | ||||||||||||||
|
Comment on lines
+137
to
+139
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The check
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| for start, end, key in self.token_database.process_tokens( | ||||||||||||||
| token_len, req_meta.block_hashes): | ||||||||||||||
| starts.append(start) | ||||||||||||||
|
|
@@ -141,15 +150,13 @@ def _handle_request(self, req_meta: ReqMeta): | |||||||||||||
| keys = keys[self.tp_rank % self.put_step::self.put_step] | ||||||||||||||
|
|
||||||||||||||
| if not keys: | ||||||||||||||
| with self.done_task_lock: | ||||||||||||||
| self.stored_requests[req_id] -= 1 | ||||||||||||||
| self.dec_stored_request(req_id) | ||||||||||||||
| return | ||||||||||||||
|
|
||||||||||||||
| skip_block_num = self.lookup(keys) | ||||||||||||||
|
|
||||||||||||||
| if skip_block_num == len(keys): | ||||||||||||||
| with self.done_task_lock: | ||||||||||||||
| self.stored_requests[req_id] -= 1 | ||||||||||||||
| self.dec_stored_request(req_id) | ||||||||||||||
| return | ||||||||||||||
|
|
||||||||||||||
| starts = starts[skip_block_num:] | ||||||||||||||
|
|
@@ -188,8 +195,7 @@ def _handle_request(self, req_meta: ReqMeta): | |||||||||||||
| current_event.synchronize() | ||||||||||||||
| self.m_store.put(keys, addrs, sizes) | ||||||||||||||
|
|
||||||||||||||
| with self.done_task_lock: | ||||||||||||||
| self.stored_requests[req_id] -= 1 | ||||||||||||||
| self.dec_stored_request(req_id) | ||||||||||||||
| self.request_queue.task_done() | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
self._get_connector_metadata()method is inherited fromKVConnectorBase_V1. Theget_finishedmethod inKVPoolWorkernow explicitly expects anAscendConnectorMetadataobject, which includespreempted_req_ids. If the inherited_get_connector_metadata()returns a genericKVConnectorMetadata(which it likely does, asAscendConnectorMetadatais a specific implementation), accessingmeta.preempted_req_idsinKVPoolWorkerwill result in anAttributeError. To ensure type safety and correct functionality,AscendStoreConnectorshould override_get_connector_metadatato explicitly return anAscendConnectorMetadatainstance, ensuring it contains the necessarypreempted_req_idsfrom the scheduler.