[Bugfix] Fix gemma4 crash on CPU: guard mem_get_info call (#44615)

Signed-off-by: ADHITHYA BALAKRISHNAN <adhithya.balakrishnan@multicorewareinc.com>
This commit is contained in:
adhithyamulticoreware
2026-06-05 18:17:56 +05:30
committed by GitHub
parent 62215e72c6
commit bbb6c274c8
+5
View File
@@ -92,6 +92,11 @@ class CpuPlatform(Platform):
return meminfo.total_memory
@classmethod
def mem_get_info(cls) -> tuple[int, int]:
meminfo = get_memory_node_info()
return meminfo.available_memory, meminfo.total_memory
@classmethod
def set_device(cls, device: torch.device) -> None:
"""