Support the Torch stable ABI#575
Draft
danieldk wants to merge 5 commits into
Draft
Conversation
|
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. |
3aadb2c to
59f09c7
Compare
This change adds an option `stable-abi` to `build.toml`. When setting ```toml [torch] stable-abi = "2.11" ``` The extension will be built targeting the Torch 2.11 stable ABI. In this case, the variant naming pattern will also change from `torch<version>` to `torch-stable-abi<abi-version>`.
Wire up the `torch-stable-abi` variant naming. For a given ABI version, we build with the newest Torch version.
This change adds support for `torch-stable-abi` variants: * We now give preference to stable ABI variants. * If there is no exact match for the Torch version, we back off to an older ABI version.
59f09c7 to
23fe07c
Compare
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 an option
stable-abitobuild.toml. When settingThe extension will be built targeting the Torch 2.11 stable ABI. In this case, the variant naming pattern will also change from
torch<version>totorch-stable-abi<abi-version>.This PR also adds support for this new type of variant to
kernelsand the Nix builder. In the case of the Nix builder, we always use the latest Torch version available for a backend + backend version combination to build the ABI-stable kernel.This change also removes the auto-update while reading from the v3 to v4
build.tomlformat. The auto-conversion can give very weird errors when there is an issue with the file. For instance, when thestable-abioption is malformed, the error message will claim that there is notorchsection. Theupdate-buildsubcommand is still available.