-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As discussed on Discord, this is a significant upgrade because it is the first stable release that has a fully functional `torch.export.export` with the preferred dynamic shapes support. It is also just prior to nightlies that completely remove support for the old constraints based API, so is therefore a good point to stop for a moment and support both styles. This patch makes a number of API changes: * Issues deprecation warnings if the `constraints=` keyword for jittable is used, otherwise not passing it to PyTorch. This should make jittable not immediately incompatible with later nightlies unless if that feature is used. * Adds the ability for a `CompiledModule` to directly have an attribute of a `torch.export.ExportedProgram`, allowing the user to pre-export with Torch and then construct a compiled module from that (vs the `jittable` approach where the `CompiledModule` API was directly invoking Torch internals to do so). This defaults to exporting as `public` if given a name not starting with an underscore and private otherwise. Private ExportedPrograms can be called from procedures just as with `jittable`. * `shark_turbine.aot.export()` now accepts either an `CompiledModule`, `nn.Module`, a or a `torch.export.ExportedProgram`. For the last two, a new `external_params=` bool is available to control whether parameters are inlined or externalized. For an `nn.Module` arguments corresponding to `torch.export.export` are added. Internally, for an `nn.Module`, it simply calls `torch.export.export`. `jittable` is no longer used internally. Some attempt has been made to be backwards compatible with Torch 2.1.0. New features will not work, but we should be able to support a short buffer window where older pinned systems are not completely broken. The repository prior to this patch will be branched to `torch_2.1`. Breaking changes: * ops.iree.trace_tensors (plural) had to be removed because the PyTorch auto functionalization thing has a TODO around lists of tensors. We can add a wrapper that takes a list and invokves trace_tensors multiple times and/or ass a `functional_trace_tensors` which works a bit better with the infra. * stateless_llama_test.py::test_rerotated_torch_comparison marked as expectedFailure. Filed #560
- Loading branch information
1 parent
b785714
commit b73c5c3
Showing
28 changed files
with
669 additions
and
201 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include README.md | ||
include requirements.txt | ||
include pytorch-cpu-requirements.txt | ||
include torchvision-requirements.txt | ||
include version_info.json |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
iree-compiler==20240311.828 | ||
iree-runtime==20240311.828 | ||
iree-compiler==20240327.844 | ||
iree-runtime==20240327.844 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--pre | ||
torch==2.1.0 | ||
mpmath==1.3.0 | ||
--index-url https://download.pytorch.org/whl/test/cpu | ||
-r pytorch-requirements.txt |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
torch==2.3.0 | ||
torchaudio | ||
torchvision |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.