8000 Make precompilation timeout configurable via TORCHINDUCTOR_PRECOMPILATION_TIMEOUT_SECONDS environment variable. by potatoooo34 · Pull Request #153403 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Make precompilation timeout configurable via TORCHINDUCTOR_PRECOMPILATION_TIMEOUT_SECONDS environment variable. #153403

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

potatoooo34
Copy link
@potatoooo34 potatoooo34 commented May 12, 2025

Fix issue with precompilation timeout handling

  • Made precompilation timeout configurable via the environment variable TORCHINDUCTOR_PRECOMPILATION_TIMEOUT_SECONDS.
  • Default value is set to 3600 seconds (1 hour) if not provided.
  • Updated config.py to include a fallback for custom timeout configuration.

Fixes #153392

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

Copy link
pytorch-bot bot commented May 12, 2025

🔗 Helpful Links

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

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.

Copy link

CLA Not Signed

Copy 8000 link
Contributor

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@@ -8,6 +8,12 @@
from torch.utils._config_module import Config, get_tristate_env, install_config_module


precompilation_timeout_seconds: int = Config(
Copy link
Contributor

Choose a reason for hiding this comment

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

lets not put it at the beginning. Also I think we don't need to set an env_name for it for now

@@ -1821,7 +1821,7 @@ def __call__(
# arg, the function will be called instead of
# generating a random torch.Tensor for benchmarking.
input_gen_fns: Optional[dict[int, Callable[[ir.Buffer], torch.Tensor]]] = None,
precompilation_timeout_seconds: int = 60 * 60,
precompilation_timeout_seconds: int = config.precompilation_timeout_seconds,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not the only place you need to change it. Try to search for precompilation_timeout_seconds .

Also do not set put config.precompilation_timeout_seconds in the default value. Try to find where this function is called from, and pass config.precompilation_timeout_seconds there.

@colesbury colesbury added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor open source 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.

[inductor] Make precompilation_timeout_seconds into a config instead of hardcoded it as 3600
4 participants
0