Replies: 1 comment
-
|
A hang at program exit usually indicates that one or more TensorRT-LLM worker processes (or the underlying NCCL communicators) have not been cleanly shut down, rather than an issue with A few things to check:
del llm
import gc
gc.collect()If CUDA contexts or communicators are still alive when Python exits, the destructor may block waiting for other ranks.
import torch
torch.cuda.synchronize()
Since the inference itself completes successfully and the hang only occurs after processing all samples, it sounds more like a shutdown/finalization issue than an inference issue. A few questions that would help narrow it down:
If If this answer helped or pointed you in the right direction, I'd appreciate it if you could mark it as the accepted answer so it's easier for others with the same issue to find. Also, if you found my contribution useful, I'd appreciate it if you could check out my GitHub profile, follow me, and star any repositories you find interesting. GitHub: https://github.com/Advait251206 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i use 0.15.0.dev version. The model initialized by
llm=tensorrt_llm.LLM( path, tokenizer, dtype="float16", build_config=build_config, tensor_parallel_size=2, pipeline_parallel_size=1, )Then, the infer run on a 4xa100 node with llm.generate(input, sampling_params).
The infer run through all samples and reach the end of the main program, but hang there.
Did i miss any config ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions