-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[https://nvbugs/6631019][test] reset compile mode in reused MPI workers + unwaive Nemotron Nano FP8 CUDA graph test on DGX B200 #17931
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
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 |
|---|---|---|
|
|
@@ -83,6 +83,22 @@ def test_reuse_hands_back_same_pool(reuse_cache): | |
| assert len(reuse_cache.prefetch.restocks) == 1 # reuse does not create a shadow | ||
|
|
||
|
|
||
| def test_worker_reset_clears_tensorrt_llm_compile_mode(monkeypatch): | ||
| import torch | ||
| from test_common.grouped_test_utils import reset_worker_torch_compile_state | ||
|
|
||
| from tensorrt_llm._torch.utils import is_torch_compiling, set_torch_compiling | ||
|
|
||
| dynamo_resets = [] | ||
| monkeypatch.setattr(torch._dynamo, "reset", lambda: dynamo_resets.append(True)) | ||
| set_torch_compiling(True) | ||
|
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.
Use monkeypatch so teardown is automatic: from tensorrt_llm._torch import utils as torch_utils
monkeypatch.setattr(torch_utils, "is_torch_compiling_flag", True) |
||
|
|
||
| reset_worker_torch_compile_state() | ||
|
|
||
| assert dynamo_resets == [True] | ||
| assert not is_torch_compiling() | ||
|
|
||
|
|
||
| def test_cached_handover_reaps_in_flight_retires(reuse_cache): | ||
| # Two same-size pools released back-to-back (concurrent LLMs in one | ||
| # test): the duplicate is retired in a BACKGROUND thread while holding | ||
|
|
||
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.
The rewrite drops the concrete Dynamo rationale (recompile counter is per-code-object, accumulates across reused workers, trips
recompile_limit=16, which is a hardFailOnRecompileLimitHitunderfullgraph=Trueand aborts the MPI job). That's the part a future reader can't reconstruct from the code. Keep it and append the compile-mode sentence rather than replacing it — e.g. one paragraph for the Dynamo counter, one foris_torch_compiling_flagleaking from a compiled LLM into a later model whose graph capture reads it during construction.