Skip to content

[Scripts] Add refresh script to clean, pull and build repo #155639

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Raymo111
Copy link
Member

Been bugging me that there's no good one-shot command to update and rebuild when switching branches. (Correct me if there is.) This script should serve as a starting point; more options can be integrated in the future.

Test plan: Tested on OSS PyTorch repo on devserver

Copy link

pytorch-bot bot commented Jun 10, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 6da3934 with merge base c4b93e6 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jun 10, 2025

# Pull and build
echo "Pulling latest version"
git pull
Copy link
Contributor

@oulgen oulgen Jun 10, 2025

Choose a reason for hiding this comment

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

if you're not checking out a new revision, what is pull doing here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, that can be done by the user outside of this script.

echo "Updating submodules"
git submodule update --init --recursive
echo "Building"
python setup.py develop
Copy link
Contributor

Choose a reason for hiding this comment

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

generally we build with various flags like

TORCH_CUDA_ARCH_LIST="9.0" USE_XNNPACK=0 USE_FBGEMM=0 USE_QNNPACK=0 USE_MKLDNN=0 USE_MIOPEN=0 USE_NNPACK=0 BUILD_CAFFE2_OPS=0 USE_GOLD_LINKER=1

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want these standardized for everyone? cc @seemethere

@Raymo111 Raymo111 requested review from c00w and clee2000 and removed request for jansel June 11, 2025 21:33
@Raymo111 Raymo111 force-pushed the gh/raymo/refresh-script branch from e799931 to 6da3934 Compare June 11, 2025 22:13
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants