-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[https://nvbugs/6105768][fix] ** Runtime GPU detection inside the test function: when total_memory < 80 GiB
#13471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| hostname: localhost | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [NIT] New file has no NVIDIA copyright header CodeRabbit raised this on 2026-08-05 and it is still unaddressed on head 9111360. If the repo's header policy covers test config files, prepend the standard SPDX header with 2026 as the modification year; if sibling |
||
| model: TinyLlama/TinyLlama-1.1B-Chat-v1.0 | ||
| backend: pytorch | ||
| enable_autotuner: false | ||
| context_servers: | ||
| disable_overlap_scheduler: true | ||
| num_instances: 1 | ||
| tensor_parallel_size: 1 | ||
| pipeline_parallel_size: 1 | ||
| max_num_tokens: 2048 | ||
| max_seq_len: 2048 | ||
| enable_chunked_prefill: true | ||
| kv_cache_config: | ||
| enable_block_reuse: true | ||
| enable_partial_reuse: true | ||
| free_gpu_memory_fraction: 0.2 | ||
| cache_transceiver_config: | ||
| backend: DEFAULT | ||
| max_tokens_in_buffer: 2048 | ||
| cuda_graph_config: | ||
| enable_padding: true | ||
| max_batch_size: 1 | ||
| generation_servers: | ||
| num_instances: 1 | ||
| tensor_parallel_size: 1 | ||
| pipeline_parallel_size: 1 | ||
| max_num_tokens: 2048 | ||
| max_seq_len: 2048 | ||
| enable_chunked_prefill: true | ||
| kv_cache_config: | ||
| enable_block_reuse: true | ||
| enable_partial_reuse: true | ||
| free_gpu_memory_fraction: 0.3 | ||
| cache_transceiver_config: | ||
| backend: DEFAULT | ||
| max_tokens_in_buffer: 2048 | ||
| cuda_graph_config: | ||
| enable_padding: true | ||
| max_batch_size: 64 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -418,6 +418,8 @@ def get_test_config(test_desc, example_dir, test_root): | |||||||||||
| f"{test_configs_root}/disagg_config_ctxtp2_gentp2_gptoss_tllm.yaml", | ||||||||||||
| "cancel_stress_test": | ||||||||||||
| f"{test_configs_root}/disagg_config_cancel_stress_test.yaml", | ||||||||||||
| "cancel_stress_test_small": | ||||||||||||
| f"{test_configs_root}/disagg_config_cancel_stress_test_small.yaml", | ||||||||||||
| "qwen3_8b": | ||||||||||||
| f"{test_configs_root}/disagg_config_ctxtp2_gentp2_qwen3_8b.yaml", | ||||||||||||
| "mamba_conc_greater_than_mbs": | ||||||||||||
|
|
@@ -3988,7 +3990,8 @@ def run_disaggregated_cancel_test(example_dir, | |||||||||||
| requests_per_burst=64, | ||||||||||||
| server_start_timeout=1200, | ||||||||||||
| model_path=None, | ||||||||||||
| cwd=None): | ||||||||||||
| cwd=None, | ||||||||||||
| prompt_len_range=(2000, 8000)): | ||||||||||||
| """Run disaggregated test with request cancellation stress test.""" | ||||||||||||
| cleanup_output_files() | ||||||||||||
| run_env = env.copy() | ||||||||||||
|
|
@@ -4014,7 +4017,8 @@ def run_disaggregated_cancel_test(example_dir, | |||||||||||
| # Run the cancel stress test | ||||||||||||
| run_cancel_stress_test(server_url, | ||||||||||||
| num_bursts=num_bursts, | ||||||||||||
| requests_per_burst=requests_per_burst) | ||||||||||||
| requests_per_burst=requests_per_burst, | ||||||||||||
| prompt_len_range=prompt_len_range) | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MINOR] The diff only widens the wrapper |
||||||||||||
|
|
||||||||||||
| # Create a temporary client config with the correct dynamic port | ||||||||||||
| client_config = config.copy() | ||||||||||||
|
|
@@ -4057,16 +4061,35 @@ def test_disaggregated_cancel_large_context_requests(disaggregated_test_root, | |||||||||||
|
|
||||||||||||
| This test sends bursts of requests with large contexts and cancels them | ||||||||||||
| during prefill to stress test resource cleanup. | ||||||||||||
|
|
||||||||||||
| DeepSeek-V3-Lite bf16 (~37 GiB) requires two disagg workers on separate | ||||||||||||
| GPUs. On single-GPU systems with <80 GiB, fall back to TinyLlama to avoid | ||||||||||||
| OOM while still exercising the cancellation code path. | ||||||||||||
| """ | ||||||||||||
| setup_model_symlink(llm_venv, deepseek_v3_model_root, | ||||||||||||
| "DeepSeek-V3-Lite/bf16") | ||||||||||||
| import torch | ||||||||||||
| gpu_mem_gib = torch.cuda.get_device_properties(0).total_memory / (1024**3) | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MINOR] If the test is collected and started on a host where CUDA init fails or no device is visible (driver hiccup, if not torch.cuda.is_available():
pytest.skip("CUDA device required for disaggregated cancel stress test") |
||||||||||||
| num_gpus = torch.cuda.device_count() | ||||||||||||
|
|
||||||||||||
| if gpu_mem_gib < 80 and num_gpus < 2: | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MAJOR] 80 GiB threshold mis-fires on single-GPU H100;
Suggested change
Also note |
||||||||||||
| model_path = os.path.join(llm_models_root(), "llama-models-v2", | ||||||||||||
| "TinyLlama-1.1B-Chat-v1.0") | ||||||||||||
| setup_model_symlink(llm_venv, model_path, | ||||||||||||
| "TinyLlama/TinyLlama-1.1B-Chat-v1.0") | ||||||||||||
| test_desc = "cancel_stress_test_small" | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MAJOR] Model is swapped silently while the test id stays On the fallback branch the test runs TinyLlama-1.1B with print(f"[cancel_stress] {gpu_mem_gib:.1f} GiB x {num_gpus} GPU(s) -> "
f"model={model_path} desc={test_desc} prompts={prompt_len_range}")so the substitution shows up in the test output. |
||||||||||||
| prompt_len_range = (200, 800) | ||||||||||||
| else: | ||||||||||||
| model_path = deepseek_v3_model_root | ||||||||||||
| setup_model_symlink(llm_venv, model_path, "DeepSeek-V3-Lite/bf16") | ||||||||||||
| test_desc = "cancel_stress_test" | ||||||||||||
| prompt_len_range = (2000, 8000) | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [NIT] Default prompt range duplicated between the helper signature and the caller
|
||||||||||||
|
|
||||||||||||
| run_disaggregated_cancel_test(disaggregated_example_root, | ||||||||||||
| "cancel_stress_test", | ||||||||||||
| test_desc, | ||||||||||||
| env=llm_venv._new_env, | ||||||||||||
| num_bursts=5, | ||||||||||||
| requests_per_burst=32, | ||||||||||||
| model_path=deepseek_v3_model_root, | ||||||||||||
| model_path=model_path, | ||||||||||||
| prompt_len_range=prompt_len_range, | ||||||||||||
| cwd=llm_venv.get_working_directory()) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add the required NVIDIA copyright header.
This new file starts with
hostnameand has no NVIDIA copyright header. Add the repository-standard header before Line 1 and use2026as the latest meaningful modification year.As per coding guidelines, all new files matching
**/*must include the NVIDIA copyright header with the year of the latest meaningful modification.🤖 Prompt for AI Agents
Source: Coding guidelines