This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Flatten build variants to build/<variant>#293
Merged
Conversation
6d82366 to
029516f
Compare
danieldk
added a commit
to huggingface/kernels
that referenced
this pull request
Nov 10, 2025
Support kernels that have the main module at `build/<variant>`. See: huggingface/kernel-builder#293
danieldk
added a commit
to huggingface/kernels
that referenced
this pull request
Nov 10, 2025
Support kernels that have the main module at `build/<variant>`. See: huggingface/kernel-builder#293
danieldk
added a commit
to huggingface/kernels
that referenced
this pull request
Nov 11, 2025
Support kernels that have the main module at `build/<variant>`. See: huggingface/kernel-builder#293
79e121a to
73c93e0
Compare
Prior to this change, kernels were stored in `build/<variant>/<extname>`. However, this was fragile because the extension name had to correspond to the repository name. This change flattens kernels to be stored inside `build/<variant>`. For compatibility with older versions of kernels, we add a module `build/<variant>/<extname>` that loads `build/<variant>`, this compatibility module will removed when the `kernels` update has been around for a while.
- Validate that the kernel does not have a file/directory `torch-ext/<mod_name>/<mod_name>` since we need that directory for the compat module. - Validate that the kernel has `torch-ext/<mod_name>/__init__.py`. This is also verified by get-kernel-check, but that only fires *after* the kernel is already compiled.
e32daf4 to
25cddd9
Compare
danieldk
added a commit
to huggingface/kernels
that referenced
this pull request
Nov 11, 2025
Support kernels that have the main module at `build/<variant>`. See: huggingface/kernel-builder#293
MekkCyber
approved these changes
Nov 11, 2025
Contributor
MekkCyber
left a comment
There was a problem hiding this comment.
Thanks for fixing this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to this change, kernels were stored in
build/<variant>/<extname>. However, this was fragile because the extension name had to correspond to the repository name. This change flattens kernels to be stored insidebuild/<variant>.For compatibility with older versions of kernels, we add a module
build/<variant>/<extname>that loadsbuild/<variant>, this compatibility module will removed when thekernelsupdate has been around for a while.