From 9b52fba816404866d5d01e9a6509ceb9b009eed7 Mon Sep 17 00:00:00 2001 From: GuoGuanghao Date: Wed, 16 Jul 2025 17:03:37 +0800 Subject: [PATCH] fix --- test/npu/test_torch_npu.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/npu/test_torch_npu.py b/test/npu/test_torch_npu.py index ca5c77b21e8..541dd3c59e7 100644 --- a/test/npu/test_torch_npu.py +++ b/test/npu/test_torch_npu.py @@ -78,6 +78,12 @@ class TorchNPUDeviceTestCase(TestCase): torch_npu.npu.synchronize() after_free_memory, after_total_memory = torch_npu.npu.mem_get_info(0) self.assertEqual(before_total_memory, after_total_memory) + + @unittest.skip("CANN doesn't support now.") + def test_set_device_res_limit(self): + ans_dict = {'cube_num': 12, 'vector_num': 24} + torch.npu.set_device_res_limit(torch.npu.current_device(), 12, 24) + self.assertEqual(ans_dict, torch.npu.get_device_res_limit(torch.npu.current_device())) class TorchNPUMemoryApiTestCase(TestCase): def test_npu_memory_stats(self): -- Gitee