[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:
@@ -92,6 +92,11 @@ class CpuPlatform(Platform):
|
|||||||
|
|
||||||
return meminfo.total_memory
|
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
|
@classmethod
|
||||||
def set_device(cls, device: torch.device) -> None:
|
def set_device(cls, device: torch.device) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user