Skip to content

Remove backend-specific generation and also use CMake variant generation in Nix#259

Merged
danieldk merged 23 commits intomainfrom
remove-backend
Feb 6, 2026
Merged

Remove backend-specific generation and also use CMake variant generation in Nix#259
danieldk merged 23 commits intomainfrom
remove-backend

Conversation

@danieldk
Copy link
Copy Markdown
Member

@danieldk danieldk commented Feb 3, 2026

This combines several changes that are mostly co-dependent:

  • Remove the --backend option from build2cmake, we now generate a CMakeLists.txt that works with all backends. The backend is determined by querying PyTorch.
  • On Linux and Darwin we move the install phase fully from Nix to CMake for arch kernels. This makes Linux, Darwin, and Windows share code paths for installation.
  • In the Nix builder, a single kernel build will be in result/<variant-name>/ in place of result/.
  • Add installation of the compatibility module to CMake installation (this fixes Windows to support old and new-style kernel paths).
  • Fixes in the CMake installation e.g.: previously kernel names with dashes were not handled correctly and Windows builds were not correctly recursively copying Python files.
  • Scrub test shell PYTHONPATH for better impure tests.

This was supported by the Nix builder before, but not the Windows
builder.
@danieldk danieldk marked this pull request as ready for review February 5, 2026 18:24
Copy link
Copy Markdown
Collaborator

@drbh drbh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return json.load(f)


EASTER_EGG = _read_json()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha great name

@danieldk danieldk merged commit b209d62 into main Feb 6, 2026
37 checks passed
@danieldk danieldk deleted the remove-backend branch February 6, 2026 06:46
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