Skip to content

Commit 11eef81

Browse files
committed
jdkansjn
1 parent a3357c0 commit 11eef81

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

sweep/infer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
import sys
2626
from typing import Any
2727

28-
# Must be set before vllm is imported — vllm reads these at import time.
29-
# v0 engine has stable LoRA + tensor-parallel support; v1 does not.
28+
# Must be set before torch/vllm are imported — read at import/init time.
29+
# Disable torch.compile globally: vLLM's vocab_parallel_embedding has a
30+
# @torch.compile'd function (get_masked_input_and_mask) that invokes Triton,
31+
# which tries to compile cuda_utils.c via gcc and needs python3.12-dev headers
32+
# that are not installed on this server. TORCHDYNAMO_DISABLE=1 makes all
33+
# @torch.compile decorators fall back to eager execution.
34+
os.environ["TORCHDYNAMO_DISABLE"] = "1"
3035
# spawn (not fork) avoids CUDA/NCCL re-init issues across worker processes.
31-
os.environ["VLLM_USE_V1"] = "0"
3236
os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
3337

3438
import torch
@@ -99,10 +103,6 @@ def vllm_generate(
99103
dtype="bfloat16",
100104
max_model_len=2048,
101105
tensor_parallel_size=n_gpus,
102-
# Disable CUDA graph capture and torch.compile/inductor AOT compilation.
103-
# The server lacks python3.12-dev headers, which Triton needs to compile
104-
# cuda_utils.c; enforce_eager bypasses that compilation entirely.
105-
enforce_eager=True,
106106
)
107107

108108
lora_request = LoRARequest("adapter", 1, checkpoint)

0 commit comments

Comments
 (0)