Skip to content

support specify cuda sdk version via cuda_sdkver#6964

Merged
waruqi merged 2 commits intoxmake-io:devfrom
choyy:dev
Oct 23, 2025
Merged

support specify cuda sdk version via cuda_sdkver#6964
waruqi merged 2 commits intoxmake-io:devfrom
choyy:dev

Conversation

@choyy
Copy link
Contributor

@choyy choyy commented Oct 23, 2025

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @choyy, 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 significantly enhances xmake's ability to detect and utilize CUDA SDKs by allowing users to explicitly define the CUDA SDK version. This change provides greater flexibility and control for projects requiring specific CUDA versions, streamlining the build process for GPU-accelerated applications. The underlying detection logic has been updated to accommodate these new parameters and provide better error reporting.

Highlights

  • New Configuration Option: Introduced a new configuration option, cuda_sdkver, across all supported platforms (BSD, Haiku, Linux, macOS, Windows) to allow users to explicitly specify the desired CUDA SDK version.
  • Enhanced CUDA SDK Detection: Refactored the internal _find_sdkdir and _find_cuda functions to support specifying both a CUDA SDK directory and a specific version. This provides more granular control over CUDA SDK selection.
  • Improved Error Handling: Added more robust error checking for invalid CUDA SDK directories and version formats, providing clearer feedback to the user when the specified CUDA SDK cannot be found or is incorrectly formatted.
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.

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 introduces support for specifying the CUDA SDK version via a new cuda_sdkver configuration option. The changes correctly modify the CUDA detection logic to use this new option and update the platform configuration files to expose it. The implementation is mostly clean and improves flexibility. However, I've found a small issue in how the detected version is saved back to the configuration, which I've detailed in a comment.

@waruqi waruqi added this to the v3.0.5 milestone Oct 23, 2025
@waruqi waruqi merged commit 954944d into xmake-io:dev Oct 23, 2025
22 checks passed
@waruqi waruqi mentioned this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants