-
Notifications
You must be signed in to change notification settings - Fork 680
use the same pytorch/torchao version same as ET repro in the wheel package test #14560
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14560
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 Cancelled JobsAs of commit 9500c91 with merge base 411578a ( CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
cf9a879
to
1aa800b
Compare
install_requirements.py
Outdated
# | ||
# NOTE: If you're changing, make the corresponding supported CUDA versions in | ||
# SUPPORTED_CUDA_VERSIONS above if needed. | ||
TORCH_VERSION = "2.10.0" |
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.
Can you put this in a separate PR?
TORCH_VERSION=$( | ||
"$PYBIN" - <<'PY' | ||
import re, pathlib | ||
txt = pathlib.Path("install_requirements.py").read_text() | ||
print(re.search(r'TORCH_VERSION\s*=\s*["\']([^"\']+)["\']', txt).group(1)) | ||
PY | ||
) | ||
|
||
NIGHTLY_VERSION=$( | ||
"$PYBIN" - <<'PY' | ||
import re, pathlib | ||
txt = pathlib.Path("install_requirements.py").read_text() | ||
print(re.search(r'NIGHTLY_VERSION\s*=\s*["\']([^"\']+)["\']', txt).group(1)) | ||
PY | ||
) | ||
echo "=== [$LABEL] Install torch==${TORCH_VERSION}.${NIGHTLY_VERSION} ===" | ||
|
||
# Install torchao based on the pinned PyTorch version | ||
"$PIPBIN" install torch=="${TORCH_VERSION}.${NIGHTLY_VERSION}" --index-url "https://download.pytorch.org/whl/nightly/cpu" | ||
|
||
# Install torchao based on the pinned commit from third-party/ao submodule | ||
pushd "$REPO_ROOT/third-party/ao" > /dev/null | ||
USE_CPP=0 "$PYBIN" setup.py develop | ||
popd > /dev/null |
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.
Given how these are stored in install_requirements.py, it feels a bit flaky. I think you can just refactor install_requirements.py so that you have torch_pin.py that defines TORCH_VERSION and NIGHTLY_VERSION. That would be cleaner.
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.
That comment was for torch
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.
Sure, add it in #14631
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.
ok rebase on top of it and fix this?
cc @GregoryComer. lets make sure there is one way to get the torchpin |
f1e4758
to
3d5c962
Compare
import re, pathlib | ||
txt = pathlib.Path("torch_pin.py").read_text() | ||
print(re.search(r'NIGHTLY_VERSION\s*=\s*["\']([^"\']+)["\']', txt).group(1)) |
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.
can you not just import torch_pin.py and get the TORCH_VERSION and NIGHTLY_VERSION from that instead of parsing the file?
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.
updated
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.
if you can import torch_pin.py that is better than parsing. approving but see if you can do that
@pytorchbot cherry-pick --onto release/1.0 -c regression |
Cherry picking #14560The cherry pick PR is at #14682 and it is recommended to link a regression cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
As title, it was hardcoded to use nightly before, causing gaps as the main executorch flow