Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Makefile: refactor build, setup and lint rules #152611

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

ariel-anieli
Copy link

Hello maintainers,

This is my first ever PR to the project; your feedback is much appreciated.

I am proposing to refactor some rules in Makefile. The output is unchanged.

After,

# make lint -n 
lintrunner

# make quicklint -n 
lintrunner

# make ios -n 
./scripts/build_ios.sh

# make setup-env-cuda -n 
make setup-env PYTHON="python3" NIGHTLY_TOOL_OPTS="pull --cuda"
make[1]: Entering directory '/home/ariel/src/pytorch'
if [ -n "" ]; then \
	echo "Please commit or stash all changes before running this script"; \
	exit 1; \
fi
python3 tools/nightly.py pull --cuda
make[1]: Leaving directory '/home/ariel/src/pytorch'

# make setup_env_cuda -n 
make setup-env PYTHON="python3" NIGHTLY_TOOL_OPTS="pull --cuda"
make[1]: Entering directory '/home/ariel/src/pytorch'
if [ -n "" ]; then \
	echo "Please commit or stash all changes before running this script"; \
	exit 1; \
fi
python3 tools/nightly.py pull --cuda
make[1]: Leaving directory '/home/ariel/src/pytorch'

# git log --oneline -1 
c48ea9abba (HEAD -> refactor-makefile, origin/refactor-makefile) Makefile: refactor build, setup and lint rules

Before,

# make lint -n 
lintrunner


# make quicklint -n 
lintrunner

# make ios -n 
./scripts/build_ios.sh

# make setup-env-cuda -n 
make setup-env PYTHON="python3" NIGHTLY_TOOL_OPTS="pull --cuda"
make[1]: Entering directory '/home/ariel/src/pytorch'
if [ -n "" ]; then \
	echo "Please commit or stash all changes before running this script"; \
	exit 1; \
fi
python3 tools/nightly.py pull --cuda
make[1]: Leaving directory '/home/ariel/src/pytorch'

# make setup_env_cuda -n 
make setup-env PYTHON="python3" NIGHTLY_TOOL_OPTS="pull --cuda"
make[1]: Entering directory '/home/ariel/src/pytorch'
if [ -n "" ]; then \
	echo "Please commit or stash all changes before running this script"; \
	exit 1; \
fi
python3 tools/nightly.py pull --cuda
make[1]: Leaving directory '/home/ariel/src/pytorch'

# git log --oneline -1 
6f6acb4128 (HEAD -> main, origin/main, origin/HEAD) [AOTI][CPU] Introduce config.cpp.use_decompose_tanh (#152542)

Copy link

pytorch-bot bot commented May 1, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit af24026 with merge base 792736f (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link

linux-foundation-easycla bot commented May 1, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ariel-anieli / name: Ariel Otilibili (af24026)

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 1, 2025
@HDCharles HDCharles requested a review from suo May 2, 2025 03:58
@HDCharles HDCharles added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 2, 2025
build rules, `setup_env_*` and `setup-env-*` differ by one flag;
`quicklint` and `lint` call the same command.

Refactor by using pattern rules.

Link: https://www.gnu.org/software/make/manual/html_node/Pattern-Examples.html
Signed-off-by: Ariel Otilibili <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants