Skip to content
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

Remove deprecated constraints and dynamic dim support with test fixes #233

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

IanNod
Copy link
Contributor

@IanNod IanNod commented Oct 18, 2024

The backing APIs have been deprecated for a year and were removed from PyTorch 2.6 nightlies, causing import errors.

torch.export and torch-mlir have long since provided a supported way for exporting dynamic dims.

@saienduri
Copy link
Contributor

With this, we can remove the torch restriction here: https://github.com/iree-org/iree-turbine/blob/main/pytorch-rocm-requirements.txt#L3

stellaraccident and others added 4 commits October 18, 2024 15:48
The backing APIs have been deprecated for a year and were removed from PyTorch 2.6 nightlies, causing import errors.

torch.export and torch-mlir have long since provided a supported way for exporting dynamic dims.

Signed-off-by: Stella Laurenzo <stellaraccident@gmail.com>
Signed-off-by: Ian <ian.nordeng@amd.com>
Signed-off-by: Ian <ian.nordeng@amd.com>
Signed-off-by: Ian <ian.nordeng@amd.com>
Signed-off-by: Ian <ian.nordeng@amd.com>
@IanNod IanNod merged commit 97e0517 into iree-org:main Oct 18, 2024
7 of 8 checks passed
ScottTodd added a commit to nod-ai/shark-ai that referenced this pull request Oct 31, 2024
Progress on #294. Once
this is merged the nightly package builds will start pushing
`sharktank-{VERSION}-py3-none-any.whl` to
https://github.com/nod-ai/SHARK-Platform/releases/tag/dev-wheels
alongside the existing shortfin wheels.

Tested at
https://github.com/ScottTodd/SHARK-Platform/actions/runs/11621153296/job/32364368882
(ignore the push failure at the end, missing a token).

---

Note that the 250KB Python wheel can be _installed_ standalone, but
actually _using_ it will need version bumps across projects and more
work. In particular, I hit

1. Using iree-turbine from pypi:
    ```
    from sharktank import ops
    ...

ImportError: cannot import name 'dynamic_dim' from 'torch.export'
(/home/nod/dev/scratch/shark-platform/3.11.venv/lib/python3.11/site-packages/torch/export/__init__.py)
    ```
That may be fixed by iree-org/iree-turbine#233
2. After installing iree-turbine from source:
    ```
    from sharktank import ops
    ...

        from gguf import GGUFReader, GGUFValueType
    ModuleNotFoundError: No module named 'gguf'
    ```

Full logs here:
https://gist.github.com/ScottTodd/4cd0c343a92375e7fbdaaf37c38bfc06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants