-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Bugfix] Fix test_long_context.py and activation kernels #12111
Conversation
Signed-off-by: Jee Jee Li <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
@@ -30,7 +30,7 @@ class FatreluAndMul(CustomOp): | |||
def __init__(self, threshold: float = 0.): | |||
super().__init__() | |||
self.threshold = threshold | |||
if current_platform.is_cuda_alike() or current_platform.is_cpu(): | |||
if current_platform.is_cuda_alike(): |
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.
this is also solved in #12150 . I prefer to merge that PR to fix cpu ci test.
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.
OK, I think it makes more sense to fix this LoRA failure in #12102, which can save one full round of CI . So I closed this PR, what do you think?
an update of the test script, it should be: if __name__ == "__main__":
from vllm import LLM, SamplingParams
from vllm.distributed import cleanup_dist_env_and_memory
# Sample prompts.
prompts = [
"Hello, my name is",
"The president of the United States is",
"The capital of France is",
"The future of AI is",
]
# Create a sampling params object.
sampling_params = SamplingParams(temperature=0.0, top_p=0.95)
model_name="facebook/opt-125m"
llm = LLM(
model=model_name,
trust_remote_code=True,
max_model_len=128,
max_num_seqs=16,
enforce_eager=True,
tensor_parallel_size=1,
)
del llm
cleanup_dist_env_and_memory()
llm = LLM(
model=model_name,
trust_remote_code=True,
max_model_len=128,
max_num_seqs=16,
enforce_eager=True,
tensor_parallel_size=2,
)
outputs = llm.generate(prompts, sampling_params) |
test_long_context.py Failure
The
test_long_context.py
is currently failing (see failure details at: test_long_context failure). The issue can be reproduced using the following code:The error occurs because during the platform check,
CUDA_VISIBLE_DEVICES
is written to environment variables, and the env var are not properly cleaned up incleanup_dist_env_and_memory
, resulting in the error mentioned above. @youkaichao Since I'm not sure if this is the expected behavior, I'm only deleting it intest_lora_context.py
Also fixed the activation kernel bug