Conversation
This change adds support for noarch build variants. So far we have used the universal variant for kernels that do not have any AoT-compiled code. However, the universal variant has two important issues: 1. A kernel without AoT-compiled might still be backend-specific. E.g. NVIDIA CuTe-based kernels are not universal in the sense that they don't work on non-NVIDIA GPUs. 2. We cannot specify dependencies per backend. To solve these issues, we introduce the noarch variants to replace universal kernels. Noarch kernels have variants of the shape `torch-<backend>` (e.g. `torch-xpu`). This resolves the issues outlined. This change introduces support for loading noarch kernels. In the future, we will start emitting deprecation warnings for universal kernels (to eventually remove support).
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
fe4aea5 to
4e50b14
Compare
MekkCyber
previously approved these changes
Dec 3, 2025
Comment on lines
+211
to
+212
| assert variant_path is not None | ||
|
|
Contributor
There was a problem hiding this comment.
not really needed but okay to keep it
Member
Author
There was a problem hiding this comment.
It is necessary to communicate to the type checker that at that point variant_path cannot be None anymore (mypy will fail without the assert).
MekkCyber
approved these changes
Dec 3, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds support for noarch build variants. So far we have used the universal variant for kernels that do not have any AoT-compiled code. However, the universal variant has two important issues:
To solve these issues, we introduce the noarch variants to replace universal kernels. Noarch kernels have variants of the shape
torch-<backend>(e.g.torch-xpu). This resolves the issues outlined.This change introduces support for loading noarch kernels. In the future, we will start emitting deprecation warnings for universal kernels (to eventually remove support).
This change also fixes some small issues with CPU kernels that surfaced while making a test for noarch.