Skip to content

Conversation

@hjh0119
Copy link
Contributor

@hjh0119 hjh0119 commented Nov 20, 2025

The PR at #25319 introduced an ImportError catch to prevent failures when importing triton. However, after upgrading vLLM from 0.11.0 to 0.11.1 via:

pip install -U vllm

Running vllm serve Qwen/Qwen3-8B results in the following error:

AttributeError: module 'triton.language' has no attribute 'constexpr_function'
  File "/usr/local/lib/python3.11/site-packages/triton_kernels/numerics_details/flexpoint.py", line 55, in <module>
    @tl.constexpr_function
     ^^^^^^^^^^^^^^^^^^^^^

This suggests a compatibility issue between the upgraded triton version and triton-kernels, where constexpr_function was either removed or renamed.

While the original PR handled ImportError, this case involves an AttributeError due to API changes in triton.language. Adding a guard for AttributeError (in addition to ImportError) could help gracefully handle such mismatches and improve robustness during dependency upgrades.

This change proposes catching AttributeError when accessing tl.constexpr_function to prevent breakage in environments where triton and triton-kernels are mismatched.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a runtime AttributeError that occurs due to version incompatibilities between triton and triton-kernels. The change extends an existing try...except block to also catch AttributeError during the import of Triton kernels, making the error handling more robust. Additionally, the exception is now logged, which will aid in debugging similar issues in the future. The change is correct and improves the project's stability in diverse environments.

Copy link
Collaborator

@LucasWilkinson LucasWilkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LucasWilkinson LucasWilkinson enabled auto-merge (squash) November 21, 2025 19:45
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 21, 2025
@LucasWilkinson LucasWilkinson merged commit 988ee66 into vllm-project:main Nov 22, 2025
50 checks passed
ywang96 pushed a commit to ywang96/vllm that referenced this pull request Nov 23, 2025
lpapavassiliou pushed a commit to lpapavassiliou/vllm that referenced this pull request Nov 24, 2025
RunkaiTao pushed a commit to RunkaiTao/vllm that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants