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 torch dependency #449

Merged
merged 10 commits into from
Jun 27, 2024
Merged

remove torch dependency #449

merged 10 commits into from
Jun 27, 2024

Conversation

msaroufim
Copy link
Member

@msaroufim msaroufim commented Jun 27, 2024

When users are running

pip install torchao

This is causing a force downgrade to torch==2.3.1

Instead we should tell users that if they want CPP extensions working with an official release they should install torch==2.3.1 in documentation but we should never force downgrade

So with this PR we remove the pytorch dependency completely and instead rely on building torchao without build isolation to make sure torch is available as a build time dependency

This is an unfortunate workaround because pyproject.toml is not expressive enough to pick a dynamic version for torch

Todo: figure out the right test strategy for this PR

Copy link

pytorch-bot bot commented Jun 27, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/449

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 94169bc with merge base 2e3ec26 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 27, 2024
Copy link

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO you need to keep runtime requirement on torch, as torchao indeed needs one
And if you want to warn users about the pytorch version it was build against, you can do it in __init__.py or something like that

@msaroufim msaroufim requested a review from atalman June 27, 2024 01:17
@msaroufim msaroufim merged commit 6cab4c8 into main Jun 27, 2024
13 checks passed
msaroufim added a commit that referenced this pull request Jun 27, 2024
* remove torch dependency

* push

* push

* push

* push

* push

* push

* Update pre_build_script.sh

* Update version.txt

* push
dbyoung18 pushed a commit to dbyoung18/ao that referenced this pull request Jul 31, 2024
* remove torch dependency

* push

* push

* push

* push

* push

* push

* Update pre_build_script.sh

* Update version.txt

* push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants