We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 856f980 commit f5522d0Copy full SHA for f5522d0
vllm_gaudi/platform.py
@@ -82,6 +82,12 @@ def set_device(cls, device: torch.device) -> None:
82
def get_device_name(cls, device_id: int = 0) -> str:
83
return cls.device_name
84
85
+ @classmethod
86
+ def get_device_total_memory(cls, device_id: int = 0) -> int:
87
+ """Get the total memory of a device in bytes."""
88
+ total_hpu_memory = torch.hpu.mem_get_info()[1]
89
+ return total_hpu_memory
90
+
91
@classmethod
92
def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
93
parallel_config = vllm_config.parallel_config
0 commit comments