[Refactor] Modify the binding logic, added memory migration and interrupt core binding functions. (#6785)
[Refactor] Modify the binding logic, added memory migration and interrupt core binding functions. ### What this PR does / why we need it? Controls the use of memory on a closer NUMA node to achieve a lower memory access latency, while binding interrupts to different CPU cores to prevent them form interrupting the inference process. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? https://github.com/vllm-project/vllm-ascend/pull/6785/changes/b8eaaa073bc99e3a25e31c16e87bbd4acd6377eb Signed-off-by: rowzwel_dx <1392851715@qq.com> Signed-off-by: Rozwel-dx <1392851715@qq.com> - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: Rozwel-dx <1392851715@qq.com>
This commit is contained in:
1 parent
3a4292e5b7
commit
a9cca0c5c4
2 files changed
+86
-5
No files matched your search
@@ -162,11 +162,11 @@ class TestCpuAlloc(unittest.TestCase):
|
||||
@patch('vllm_ascend.cpu_binding.execute_command')
|
||||
def test_allocate(self, mock_execute_command):
|
||||
self.cpu_alloc.device_info.running_npu_list = [0]
|
||||
self.cpu_alloc.npu_cpu_pool = {0: [0, 1, 2]}
|
||||
self.cpu_alloc.npu_cpu_pool = {0: [0, 1, 2, 3, 4]}
|
||||
self.cpu_alloc.allocate()
|
||||
self.assertEqual(self.cpu_alloc.assign_main[0], [0])
|
||||
self.assertEqual(self.cpu_alloc.assign_acl[0], [1])
|
||||
self.assertEqual(self.cpu_alloc.assign_rel[0], [2])
|
||||
self.assertEqual(self.cpu_alloc.assign_main[0], [2])
|
||||
self.assertEqual(self.cpu_alloc.assign_acl[0], [3])
|
||||
self.assertEqual(self.cpu_alloc.assign_rel[0], [4])
|
||||
self.cpu_alloc.npu_cpu_pool = {0: [0, 1]}
|
||||
with self.assertRaises(RuntimeError):
|
||||
self.cpu_alloc.allocate()
|
||||
|
||||
Reference in new issue
Block a user