-
Notifications
You must be signed in to change notification settings - Fork 29
Support noarch build variants #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you
| assert variant_path is not None | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really needed but okay to keep it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okay makes sense 👍
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.