[AMD] Support Hierarchical Caching on AMD GPUs (#8236)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.srt.utils import is_hip, kill_process_tree
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
@@ -11,6 +11,8 @@ from sglang.test.test_utils import (
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
_is_hip = is_hip()
|
||||
|
||||
|
||||
class TestHiCache(CustomTestCase):
|
||||
@classmethod
|
||||
@@ -26,7 +28,7 @@ class TestHiCache(CustomTestCase):
|
||||
"--mem-fraction-static",
|
||||
0.7,
|
||||
"--hicache-size",
|
||||
100,
|
||||
100 if not _is_hip else 200,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.srt.utils import is_hip, kill_process_tree
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MLA_MODEL_NAME_FOR_TEST,
|
||||
@@ -11,6 +11,12 @@ from sglang.test.test_utils import (
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
_is_hip = is_hip()
|
||||
if _is_hip:
|
||||
hicache_args = ["--hicache-size", 200]
|
||||
else:
|
||||
hicache_args = ["--hicache-ratio", 2]
|
||||
|
||||
|
||||
class TestHierarchicalMLA(CustomTestCase):
|
||||
@classmethod
|
||||
@@ -24,9 +30,8 @@ class TestHierarchicalMLA(CustomTestCase):
|
||||
other_args=[
|
||||
"--trust-remote-code",
|
||||
"--enable-hierarchical-cache",
|
||||
"--hicache-ratio",
|
||||
2,
|
||||
],
|
||||
]
|
||||
+ hicache_args,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.srt.utils import is_hip, kill_process_tree
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
@@ -11,6 +11,8 @@ from sglang.test.test_utils import (
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
_is_hip = is_hip()
|
||||
|
||||
|
||||
class TestHiCache(CustomTestCase):
|
||||
@classmethod
|
||||
@@ -26,7 +28,7 @@ class TestHiCache(CustomTestCase):
|
||||
"--mem-fraction-static",
|
||||
0.7,
|
||||
"--hicache-size",
|
||||
100,
|
||||
100 if not _is_hip else 200,
|
||||
"--page-size",
|
||||
"64",
|
||||
"--hicache-storage-backend",
|
||||
|
||||
@@ -162,6 +162,9 @@ suites = {
|
||||
# Add AMD tests
|
||||
suite_amd = {
|
||||
"per-commit-amd": [
|
||||
TestFile("hicache/test_hicache.py", 116),
|
||||
TestFile("hicache/test_hicache_mla.py", 127),
|
||||
TestFile("hicache/test_hicache_storage.py", 127),
|
||||
TestFile("lora/test_lora.py", 200),
|
||||
TestFile("lora/test_lora_eviction.py", 200),
|
||||
TestFile("lora/test_lora_backend.py", 99),
|
||||
|
||||
Reference in New Issue
Block a user