"...git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "0e3fe896e2a02e7ca74525c1a79f4cd428320eb6"
Unverified Commit a5416bc5 authored by sihao_li's avatar sihao_li Committed by GitHub
Browse files

[XPU] Support Intel XPU hardware information collection in usage stats (#37964)


Signed-off-by: default avatarsihao.li <sihao.li@intel.com>
parent b3601da6
...@@ -136,6 +136,7 @@ class UsageMessage: ...@@ -136,6 +136,7 @@ class UsageMessage:
self.total_memory: int | None = None self.total_memory: int | None = None
self.architecture: str | None = None self.architecture: str | None = None
self.platform: str | None = None self.platform: str | None = None
self.xpu_runtime: str | None = None
self.cuda_runtime: str | None = None self.cuda_runtime: str | None = None
self.gpu_count: int | None = None self.gpu_count: int | None = None
self.gpu_type: str | None = None self.gpu_type: str | None = None
...@@ -201,6 +202,11 @@ class UsageMessage: ...@@ -201,6 +202,11 @@ class UsageMessage:
) )
if current_platform.is_cuda(): if current_platform.is_cuda():
self.cuda_runtime = torch.version.cuda self.cuda_runtime = torch.version.cuda
if current_platform.is_xpu():
self.xpu_runtime = torch.version.xpu
self.gpu_count = torch.xpu.device_count()
self.gpu_type = torch.xpu.get_device_name(0)
self.gpu_memory_per_device = torch.xpu.get_device_properties(0).total_memory
if current_platform.is_tpu(): # noqa: SIM102 if current_platform.is_tpu(): # noqa: SIM102
if not self._report_tpu_inference_usage(): if not self._report_tpu_inference_usage():
logger.exception("Failed to collect TPU information") logger.exception("Failed to collect TPU information")
......
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