Skip to content

Conversation

@PabloCarmona
Copy link
Collaborator

Description

This pull request improves the robustness and compatibility of the CMake configuration when detecting and using the Python executable for helper commands, such as querying pybind11 and PyTorch settings. The changes ensure that the correct Python interpreter is used, provide better error handling, and maintain compatibility with legacy variables.

Details

Python Executable Handling:

  • Introduced the RPU_PYTHON_EXECUTABLE variable to consistently determine the Python interpreter, falling back to the legacy PYTHON_EXECUTABLE if necessary, and added a fatal error if no executable is found.

Error Handling and Command Execution:

  • Updated all calls to Python helper commands (pybind11 and torch queries) to use RPU_PYTHON_EXECUTABLE and added explicit error checking with informative fatal error messages if the commands fail or return unexpected output. [1] [2]
  • Added validation for the output of the PyTorch ABI query to ensure it returns only '0' or '1', with a fatal error if the output is invalid.

@PabloCarmona PabloCarmona marked this pull request as ready for review February 9, 2026 13:16
@PabloCarmona PabloCarmona merged commit f0057c9 into master Feb 9, 2026
9 checks passed
@PabloCarmona PabloCarmona deleted the build-wheels branch February 9, 2026 13:17
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.

1 participant