From b5b6f8ca2675b02dc7de9f9ee2096bd1e59ade76 Mon Sep 17 00:00:00 2001 From: jmaksymczuk Date: Tue, 3 Sep 2024 14:00:43 +0300 Subject: [PATCH] Add dummy torch.hpu --- vllm/cpu_migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/cpu_migration.py b/vllm/cpu_migration.py index 8275f037e498e..33def1d5086ff 100644 --- a/vllm/cpu_migration.py +++ b/vllm/cpu_migration.py @@ -13,8 +13,8 @@ import habana_frameworks.torch as htorch import torch -# torch.hpu = sys.modules['torch.hpu'] = types.ModuleType('torch.hpu') -# torch.hpu.synchronize = lambda: print('calling synchronize') +torch.hpu = sys.modules['torch.hpu'] = types.ModuleType('torch.hpu') +torch.hpu.synchronize = lambda: print('calling synchronize') class CpuMigration: def __init__(self):