[Fix] Judge the phase-checker device-assert test by its FAIL line, not the exit code (#34017)
This commit is contained in:
@@ -57,7 +57,6 @@ class TestQwen3NextLazyExtraBufferLargePage(
|
||||
class TestQwen3NextLazyExtraBufferAllocFail(KLDivergenceMixin, DefaultServerBase):
|
||||
model = QWEN3_NEXT_MODEL
|
||||
cache_chunk_size = 64
|
||||
gsm8k_accuracy_thres = 0.93
|
||||
kl_div_thres = 0.002
|
||||
other_args = _make_args(page_size=1, track_interval=2)
|
||||
|
||||
@@ -79,7 +78,6 @@ class TestQwen3NextLazyExtraBufferLargePageAllocFail(
|
||||
):
|
||||
model = QWEN3_NEXT_MODEL
|
||||
cache_chunk_size = 64
|
||||
gsm8k_accuracy_thres = 0.93
|
||||
kl_div_thres = 0.002
|
||||
other_args = _make_args(page_size=2, track_interval=2)
|
||||
|
||||
|
||||
@@ -166,19 +166,20 @@ class TestUpdateAssertEnabled(CustomTestCase):
|
||||
text=True,
|
||||
timeout=180,
|
||||
)
|
||||
# Accept both exit-0 (RuntimeError caught) and SIGABRT (-6, the kernel's
|
||||
# device_assert killed the process directly before sync could raise).
|
||||
# Either way, the kernel-side check fired — which is what we're verifying.
|
||||
# The presence of the SimplePhaseChecker FAIL line in stdout confirms it.
|
||||
# The FAIL line is the evidence that the kernel-side check fired. How the
|
||||
# process then dies is not: the CUDA coredump handler may abort it, and sync
|
||||
# otherwise raises cudaErrorAssert or a generic cudaErrorLaunchFailure
|
||||
# depending on whether generation ran. Only exit 1 means it never fired.
|
||||
self.assertIn(
|
||||
"SimplePhaseChecker FAIL",
|
||||
result.stdout,
|
||||
f"returncode {result.returncode}; "
|
||||
f"stdout: {result.stdout}\nstderr: {result.stderr}",
|
||||
)
|
||||
self.assertIn(
|
||||
self.assertNotEqual(
|
||||
result.returncode,
|
||||
(0, -6),
|
||||
f"unexpected returncode {result.returncode}; "
|
||||
1,
|
||||
"the mismatch did not fire device_assert; "
|
||||
f"stdout: {result.stdout}\nstderr: {result.stderr}",
|
||||
)
|
||||
|
||||
|
||||
@@ -9,12 +9,16 @@ import unittest
|
||||
import openai
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.vlm_utils import *
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
popen_launch_server,
|
||||
)
|
||||
from sglang.test.vlm_utils import (
|
||||
IMAGE_MAN_IRONING_URL,
|
||||
AudioOpenAITestMixin,
|
||||
CustomTestCase,
|
||||
ImageOpenAITestMixin,
|
||||
OmniOpenAITestMixin,
|
||||
TestOpenAIMLLMServerBase,
|
||||
VideoOpenAITestMixin,
|
||||
terminate_and_kill_process_tree,
|
||||
@@ -231,7 +235,6 @@ del (
|
||||
ImageOpenAITestMixin,
|
||||
VideoOpenAITestMixin,
|
||||
AudioOpenAITestMixin,
|
||||
OmniOpenAITestMixin,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user