Unverified Commit 25257d8e authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Tiny assert no running requests when releasing memory to avoid IMA (#12341)

parent cf0c2415
...@@ -106,6 +106,10 @@ class SchedulerUpdateWeightsMixin: ...@@ -106,6 +106,10 @@ class SchedulerUpdateWeightsMixin:
def release_memory_occupation( def release_memory_occupation(
self: Scheduler, recv_req: ReleaseMemoryOccupationReqInput self: Scheduler, recv_req: ReleaseMemoryOccupationReqInput
): ):
assert (
self._is_no_request()
), "release_memory_occupation should be called only when no ongoing request."
tags = recv_req.tags tags = recv_req.tags
if tags is None or len(tags) == 0: if tags is None or len(tags) == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment