Skip to content

Commit

Permalink
LIGHTLLM_PYNCCL_ENABLE default False (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
WANDY666 authored Nov 27, 2024
1 parent af0d743 commit b8ef073
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lightllm/common/basemodel/cuda_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def replay(self, input_ids, infer_state):
@torch.no_grad()
def warmup(self, model):
logger.info("Begin capture cudagraph, use the --disable_cudagraph to disable it.")
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", "True").upper() in ["ON", "TRUE", "1"]
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", "False").upper() in ["ON", "TRUE", "1"]
graph_capture_context_manager = graph_capture() if LIGHTLLM_PYNCCL_ENABLE else nullcontext()
with graph_capture_context_manager as graph_capture_context:
self.stream = graph_capture_context.stream if graph_capture_context is not None else None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def init_model(self, kvargs):
max_total_token_num = kvargs["max_total_token_num"]

torch.cuda.set_device(self.tp_rank)
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", str(not self.disable_cudagraph)).upper() in [
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", "False").upper() in [
"ON",
"TRUE",
"1",
Expand Down
3 changes: 1 addition & 2 deletions test/model/model_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ def tppart_model_infer(model_class, model_kvargs, batch_size, input_len, output_
rank_id = model_kvargs["tp_rank"]
world_size = model_kvargs["world_size"]

disable_cudagraph = model_kvargs.get("disable_cudagraph", False)
torch.cuda.set_device(rank_id)
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", str(not disable_cudagraph)).upper() in [
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", "False").upper() in [
"ON",
"TRUE",
"1",
Expand Down
3 changes: 1 addition & 2 deletions test/model/test_settings/model_infer_batchs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ def tppart_model_infer(model_class, model_kvargs, batch_sizes, input_len, output
rank_id = model_kvargs["tp_rank"]
world_size = model_kvargs["world_size"]

disable_cudagraph = model_kvargs.get("disable_cudagraph", False)
torch.cuda.set_device(rank_id)
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", str(not disable_cudagraph)).upper() in [
LIGHTLLM_PYNCCL_ENABLE = os.getenv("LIGHTLLM_PYNCCL_ENABLE", "False").upper() in [
"ON",
"TRUE",
"1",
Expand Down

0 comments on commit b8ef073

Please sign in to comment.