[Bugfix][HiSparse] Never allocate GPU pages without host backing (#59036)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Co-authored-by: Matthew Bonanni <mbonanni@redhat.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Wilkinson
2026-09-30 04:13:29 +00:00
committed by GitHub
co-authored by Matthew Bonanni Claude Opus 5.5
parent e006d761a5
commit 90e13fc757
8 changed files with 252 additions and 85 deletions
+6 -3
View File
@@ -660,10 +660,13 @@ class HiSparseCoordinator:
return command
def has_pending_reclamation(self) -> bool:
"""Whether an in-flight spill will free GPU blocks on completion."""
"""Whether an in-flight spill will free GPU or host blocks on completion."""
return any(
pending.page[0] in self.request_states
and self._can_read_from_host(pending.page[0])
pending.host_block.ref_cnt == 1
or (
pending.page[0] in self.request_states
and self._can_read_from_host(pending.page[0])
)
for pending in self.pending_spills.values()
)