Skip to content

Conversation

@larryliu0820
Copy link
Contributor

This pull request simplifies the process for building ExecuTorch with CUDA support by removing the requirement to set the CMAKE_ARGS environment variable. Now, CUDA support is automatically detected and handled during installation, streamlining both CI workflows and installation logic. Additionally, related documentation and error messages have been updated for clarity.

CI/CD and Installation Process Simplification

  • Removed the need to set CMAKE_ARGS="-DEXECUTORCH_BUILD_CUDA=ON" in CI scripts and workflow files; install_executorch.sh now handles CUDA detection automatically. (.ci/scripts/test-cuda-build.sh, .github/workflows/cuda.yml) [1] [2] [3] [4] [5]
  • Deleted the _is_cuda_enabled() function from install_utils.py and refactored logic to rely solely on CUDA detection via nvcc. [1] [2] [3]

Error Handling and Messaging Improvements

  • Updated error messages in install_utils.py to remove references to "CUDA delegate" and clarify instructions for users when CUDA is not detected or supported.

Internal Refactoring

  • Applied functools.lru_cache to _get_cuda_version() for more efficient repeated CUDA version detection.

These changes make the CUDA build process more user-friendly and reduce the risk of misconfiguration.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15027

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Cancelled Job

As of commit da03f52 with merge base 45336ce (image):

CANCELLED JOB - The following job was cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@larryliu0820 larryliu0820 merged commit 1a5eaec into main Oct 14, 2025
282 of 283 checks passed
@larryliu0820 larryliu0820 deleted the auto_detect_cuda branch October 14, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants