Skip to content

[BugFix][310P] remove triton-ascend's installation of 310p devices - #7238

Closed
Tflowers-0129 wants to merge 6 commits into
vllm-project:mainfrom
Tflowers-0129:rmtriton
Closed

Tflowers-0129 wants to merge 6 commits into
vllm-project:mainfrom
Tflowers-0129:rmtriton

Conversation

@Tflowers-0129

@Tflowers-0129 Tflowers-0129 commented Mar 14, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it?

The triton-ascend dependency has been removed from the pyproject.toml build requirements to prevent its installation on 310p, because the triton-ascend cannot use by 310p, when it install by default cause some error in spec and fusion pass.

Does this PR introduce any user-facing change?

NO

How was this patch tested?

the ci and local tests

  • vLLM version: v0.18.0

Signed-off-by: Tflowers-0129 <2906339855@qq.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the project's dependency management by introducing conditional logic for the triton-ascend package. The change ensures that triton-ascend is only installed when necessary, specifically excluding it for Ascend 310P SOC versions, thereby optimizing the build process and reducing unnecessary dependencies for certain hardware configurations.

Highlights

  • Dependency Management: The triton-ascend dependency has been removed from the pyproject.toml build requirements to prevent its installation on specific hardware configurations.
  • Conditional Installation Logic: New logic has been introduced in setup.py to dynamically determine if triton-ascend should be included in the project's dependencies based on the SOC_VERSION environment variable, specifically for ascend310p devices.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • pyproject.toml
    • Updated comments to clarify triton-ascend handling in setup.py.
    • Removed triton-ascend from the direct build requirements list.
  • setup.py
    • Imported the re module for regular expression matching.
    • Added a helper function _requirement_name to extract package names from requirement strings.
    • Implemented logic to detect ascend310p SOC versions and conditionally filter out triton-ascend from resolved requirements.
    • Improved _read_requirements to handle blank lines and comments more robustly.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

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

Copy link
Copy Markdown
Contributor

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 correctly removes the triton-ascend dependency for 310P devices by updating pyproject.toml and adding dynamic filtering in setup.py. This prevents installation failures on 310P hardware. One improvement is suggested in setup.py to use the packaging library for more robust parsing of requirement strings.

The pull request title and description do not follow the repository's style guide. Here are the suggested updates:

Suggested PR Title:

[CI][BugFix] Skip triton-ascend installation on 310P devices

Suggested PR Summary:

### What this PR does / why we need it?
This pull request modifies the package installation process to conditionally exclude the `triton-ascend` dependency when building for Ascend 310P devices. The `triton-ascend` package is not supported on 310P, and its inclusion causes installation failures.

Changes include:
- Removing `triton-ascend` from the static `build-system.requires` list in `pyproject.toml`.
- Updating `setup.py` to dynamically parse `requirements.txt` and filter out `triton-ascend` if the `SOC_VERSION` environment variable indicates a 310P device.

This change ensures that the project can be successfully built and installed on environments with Ascend 310P hardware.

### Does this PR introduce _any_ user-facing change?
No, this change only affects the build and installation process and does not introduce any user-facing changes to the library's API or behavior.

### How was this patch tested?
The patch was tested by building the package in an environment simulating an Ascend 310P device (by setting the `SOC_VERSION` environment variable). The build logs were checked to confirm that the `triton-ascend` package was correctly skipped during installation.

Comment thread setup.py Outdated
Signed-off-by: Tflowers-0129 <2906339855@qq.com>
Signed-off-by: Tflowers-0129 <2906339855@qq.com>
@Tflowers-0129 Tflowers-0129 changed the title [310P] remove triton-ascend's install of 310p devices [310P] remove triton-ascend's installation of 310p devices Mar 16, 2026
@Tflowers-0129 Tflowers-0129 changed the title [310P] remove triton-ascend's installation of 310p devices [BugFix][310P] remove triton-ascend's installation of 310p devices Apr 9, 2026
@huangmengwei-cmss

Copy link
Copy Markdown

310p的dockerfile文件中的triton ascend也应该移除吧

@Tflowers-0129

Copy link
Copy Markdown
Collaborator Author

310p的dockerfile文件中的triton ascend也应该移除吧

感谢,我去看看

Signed-off-by: Tflowers-0129 <2906339855@qq.com>
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Tflowers-0129

Copy link
Copy Markdown
Collaborator Author

no need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants