-
Notifications
You must be signed in to change notification settings - Fork 688
Add CI workflow to check c10 is synced with PyTorch #10413
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
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10413
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This script checks that all files in our c10 copy are in sync with our pinned version of PyTorch. Test Plan: 1) detected us being out of sync when I wrote this PR 2) CI to run it and make sure that we are clean now ghstack-source-id: 63e3e79 ghstack-comment-id: 2825552562 Pull-Request-resolved: #10413
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.
This is great
# LICENSE file in the root directory of this source tree. | ||
|
||
set -exu | ||
ls pytorch/.git || git clone https://github.com/pytorch/pytorch.git |
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.
nit: --depth 1
? or will the commit checkout not work?
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.
pretty sure --depth 1 will break checking out specific commit. also checked and there's no way to clone just a specific commit
.github/workflows/check-c10-sync.yml
Outdated
set -ex | ||
git clone https://github.com/pytorch/pytorch.git | ||
pushd pytorch || return | ||
git checkout "$(< ../.ci/docker/ci_commit_pins/pytorch.txt)" | ||
popd |
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 check_c10_sync.sh
already handles this, why do we need to do this here?
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.
whoops
.ci/scripts/check_c10_sync.sh
Outdated
pushd pytorch | ||
git checkout "$(< ../.ci/docker/ci_commit_pins/pytorch.txt)" | ||
popd | ||
"$(dirname "${BASH_SOURCE[0]}")"/diff_c10_mirror_with_pytorch.sh |
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.
"$(dirname "${BASH_SOURCE[0]}")"/diff_c10_mirror_with_pytorch.sh | |
"$(git rev-parse --show-toplevel)/.ci/scripts/diff_c10_mirror_with_pytorch.sh" |
mega nit: this implicitly assumes theses scripts will always be adjacent
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
$(dirname "${BASH_SOURCE[0]}")/compare_dirs.sh runtime/core/portable_type/c10/c10 pytorch/c10 |
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.
Why do we need this script for just a single line? Can we just use the line directly in check_c10_sync.sh
?
If not, I guess we want to either exec
this or set -eu
up top
This script checks that all files in our c10 copy are in sync with our pinned version of PyTorch. Test Plan: 1) detected us being out of sync when I wrote this PR 2) CI to run it and make sure that we are clean now ghstack-source-id: 64b1b89 ghstack-comment-id: 2825552562 Pull-Request-resolved: #10413
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.
Please address CI paths
comments
.github/workflows/check-c10-sync.yml
Outdated
paths: | ||
- .ci/docker/ci_commit_pins/pytorch.txt | ||
- .ci/scripts/compare_dirs.sh | ||
- .ci/scripts/diff_c10_mirror_with_pytorch.sh |
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.
Delete — diff_c10_mirror_with_pytorch
no longer exists
|
||
on: | ||
pull_request: | ||
paths: |
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.
We should also add runtime/core/portable_type/c10
to this list
This script checks that all files in our c10 copy are in sync with our pinned version of PyTorch. Test Plan: 1) detected us being out of sync when I wrote this PR 2) CI to run it and make sure that we are clean now ghstack-source-id: 8eb6700 ghstack-comment-id: 2825552562 Pull-Request-resolved: #10413
This script checks that all files in our c10 copy are in sync with our pinned version of PyTorch.
Test Plan: 1) detected us being out of sync when I wrote this PR
2) CI to run it and make sure that we are clean now