feat: limit RAM usage in bazel build#4418
Open
zewenli98 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-17 23:16:00.055965+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-17 23:16:20.971622+00:00
@@ -2,11 +2,10 @@
import torch
from torch.fx import GraphModule, Node
from .pass_utils import clean_up_graph_after_modifications
-
_INT64_MAX = 2**63 - 1
_SYM_MIN = getattr(torch, "sym_min", None)
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-17 23:15:58.273713+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-17 23:16:23.806062+00:00
@@ -2,11 +2,10 @@
import torch
from torch.fx import GraphModule, Node
from .pass_utils import clean_up_graph_after_modifications
-
_INT64_MAX = 2**63 - 1
_SYM_MIN = getattr(torch, "sym_min", None)
narendasan
reviewed
Jul 20, 2026
Collaborator
There was a problem hiding this comment.
If these are user specific I think we shouldnt check them in. Can be in gitignore We can just use the try-import to pull them in optionally
Collaborator
|
Also we should note this in the contributors.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building torch-trt from source, the bazel often gets stuck and gets OOM if memory is limited, as it runs 32 actions in parallel. This PR defaults to:
It caps concurrent actions and let bazel schedule against a RAM budget. Feel free to tune --jobs up/down based on how much headroom
free -gshows during a build.Fixes # (issue)
Type of change
Checklist: