flashinfer icon indicating copy to clipboard operation
flashinfer copied to clipboard

chore: allow custom paths for external dependencies like CUTLASS

Open yzh119 opened this issue 2 months ago โ€ข 2 comments

๐Ÿ“Œ Description

Implement features mentioned in #1806 , now user can specify custom dependencies path (e.g. if they are installed as system library) via environment variables FLASHINFER_CUTLASS_INCLUDE_PATH etc.

User can run python -m flashinfer show-config to display these environment variables.

cc @bwl1289

๐Ÿ” Related Issues

#1806

๐Ÿš€ Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.

โœ… Pre-commit Checks

  • [x] I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • [x] I have installed the hooks with pre-commit install.
  • [x] I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

๐Ÿงช Tests

  • [x] Tests have been added or updated as needed.
  • [ ] All tests are passing (unittest, etc.).

Reviewer Notes

yzh119 avatar Oct 01 '25 01:10 yzh119

Summary of Changes

Hello @yzh119, I'm Gemini Code Assist[^1]! 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 enhances the flexibility of FlashInfer's build system by allowing users to define custom installation paths for critical external dependencies such as CUTLASS, SPDLOG, and NVSHMEM. This change simplifies integration into diverse development environments and system configurations, reducing potential conflicts and improving overall usability for advanced users who manage their own dependency installations. The update also ensures that configuration details are easily inspectable via the show-config utility.

Highlights

  • Custom Dependency Paths: Introduced the ability for users to specify custom paths for external dependencies like CUTLASS, SPDLOG, and NVSHMEM using new environment variables (e.g., FLASHINFER_CUTLASS_INCLUDE_PATH).
  • Backward Compatibility: Ensured backward compatibility for NVSHMEM-related environment variables by checking for the new FLASHINFER_ prefixed variables first, then falling back to the older NVSHMEM_ prefixed ones.
  • Configuration Visibility: Updated the python -m flashinfer show-config command to display the values of these new environment variables, providing better transparency for users.
  • Dynamic Path Resolution: Refactored the internal handling of CUTLASS and SPDLOG include paths to use getter functions, allowing dynamic resolution based on environment variables rather than static paths.
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 :thumbsup: and :thumbsdown: 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.

[^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.

gemini-code-assist[bot] avatar Oct 01 '25 01:10 gemini-code-assist[bot]

@yzh119 even we don't want to release rc version, we need to fix the release issue https://github.com/flashinfer-ai/flashinfer/actions/runs/18338855616/job/52229146277

zhyncs avatar Oct 08 '25 22:10 zhyncs