[NPU] [BUGFIX] Test ascend memory consumption.py fix (#17995)
This commit is contained in:
@@ -19,9 +19,8 @@ from sglang.test.test_utils import (
|
|||||||
|
|
||||||
register_npu_ci(
|
register_npu_ci(
|
||||||
est_time=400,
|
est_time=400,
|
||||||
suite="nightly-1-npu-a3",
|
suite="nightly-2-npu-a3",
|
||||||
nightly=True,
|
nightly=True,
|
||||||
disabled="run failed",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if "ASCEND_RT_VISIBLE_DEVICES" not in os.environ:
|
if "ASCEND_RT_VISIBLE_DEVICES" not in os.environ:
|
||||||
@@ -36,7 +35,7 @@ class TestMemoryConsumptionAscend(CustomTestCase):
|
|||||||
|
|
||||||
def test_memory_consumption(self):
|
def test_memory_consumption(self):
|
||||||
|
|
||||||
model = "nytopop/Qwen3-30B-A3B.w8a8"
|
model = "/root/.cache/modelscope/hub/models/Qwen/Qwen3-30B-A3B-w8a8"
|
||||||
base_url = DEFAULT_URL_FOR_TEST
|
base_url = DEFAULT_URL_FOR_TEST
|
||||||
|
|
||||||
### Calculate initial used memory
|
### Calculate initial used memory
|
||||||
@@ -71,7 +70,7 @@ class TestMemoryConsumptionAscend(CustomTestCase):
|
|||||||
used_memory_after_server_starting = (
|
used_memory_after_server_starting = (
|
||||||
total_npu_memory - free_npu_memory - initial_used_memory
|
total_npu_memory - free_npu_memory - initial_used_memory
|
||||||
) / (1 << 30)
|
) / (1 << 30)
|
||||||
self.assertLessEqual(float(used_memory_after_server_starting), 16.00)
|
self.assertLessEqual(float(used_memory_after_server_starting), 17.00)
|
||||||
|
|
||||||
# Clean up everything
|
# Clean up everything
|
||||||
kill_process_tree(process.pid)
|
kill_process_tree(process.pid)
|
||||||
|
|||||||
Reference in New Issue
Block a user