feat: Enable TensorRT-RTX build for linux-aarch64 (SBSA / DGX Spark)#4426
feat: Enable TensorRT-RTX build for linux-aarch64 (SBSA / DGX Spark)#4426narendasan wants to merge 1 commit into
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-22 20:26:58.191844+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-22 20:27:16.313461+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-22 20:26:59.786592+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-22 20:27:20.904802+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-22 20:26:58.610133+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-22 20:27:22.936809+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-22 20:26:58.542315+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-22 20:27:22.244056+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)
24ae757 to
64f51d4
Compare
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-23 01:33:23.576086+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/lowering/passes/eliminate_sym_min_int64_max.py 2026-07-23 01:33:48.284954+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)
| package-name: torch_tensorrt | ||
| display-name: RTX - Build SBSA torch-tensorrt whl package | ||
| name: ${{ matrix.display-name }} | ||
| uses: ./.github/workflows/build_linux.yml |
There was a problem hiding this comment.
IIUC this calls into setup.py. From my understanding of the code, we may need to modify that one as well?
- The
if IS_SBSA:branch is tested before theUSE_TRT_RTXbranch (which is in x86_64) during compilation. This means an aarch64+RTX build resolves the pybind include dir to @tensorrt_sbsa (which is enterprise) while the Bazel core is modified to link @tensorrt_rtx_sbsa. We should have a tensorrt_rtx_sbsa_external_dir lambda and use it when IS_SBSA and USE_TRT_RTX. - Similarly the SBSA wheels have the wrong dependencies.
get_sbsa_requirementstoday unconditionally appendstensorrt>=11.0.0,<11.1.0and does not have a USE_TRT_RTX branch (unlike get_x86_64_requirements which emitstensorrt_rtx>=1.5.0.114,<1.6.0.0) - These wheels also can get pushed to pypi as it is right now : should we gate it till we see everything passes?
There was a problem hiding this comment.
These wheels also can get pushed to pypi as it is right now : should we gate it till we see everything passes?
I think its ok since we dont run tests on this channel in CI, there are no gpu runners
| pre-script: packaging/pre_build_script.sh | ||
| env-var-script: packaging/env_vars.txt | ||
| post-script: packaging/post_build_script.sh | ||
| smoke-test-script: packaging/smoke_test_script.sh |
There was a problem hiding this comment.
I see this in CI
# Smoke test is intentionally disabled.
# The issue was smoke test installs the built torch_tensorrt wheel file and checks `import torch_tensorrt; print(torch_tensorrt.__version__)`
# Since tensorrt cannot be pip installable in CI, the smoke test will fail.
# One way we tried to handle it is manually install tensorrt wheel while by extracting from the tarball.
# However, the TensorRT-10.8.0.43/lib path doesn't seem to show up in LD_LIBRARY_PATH even if we explicitly set it.
# TODO: Implement a custom smoke_test script to verify torch_tensorrt installation.
is this still true? I checked it because of the comment below (where malformed wheels can get pushed to pypi potentially). Why is tensorrt not pip installable in CI (because of GPU requirements or something)? An import torch_tensorrt; assert ENABLED_FEATURES.tensorrt_rtx check would suffice here I think
TensorRT-RTX 1.5 ships a Linux aarch64 (SBSA) distribution that supports
DGX Spark (GB10, compute capability 12.1, experimental), but the repo only
wired up the x86_64 and Windows RTX archives. This adds the aarch64 RTX
archive and threads a rtx_sbsa config_setting (aarch64 + linux +
compute_libs=rtx) through the TensorRT selects, so USE_TRT_RTX=1 builds
resolve @tensorrt_rtx_sbsa on aarch64.
Build wiring:
- MODULE.bazel + toolchains/ci_workspaces/MODULE.bazel.tmpl: add tensorrt_rtx_sbsa
http_archive (aarch64 tarball). CI regenerates MODULE.bazel from the template
(pre_build_script.sh), so both must carry the archive.
- third_party/tensorrt_rtx/{archive,local}/BUILD: rtx_sbsa config_setting
+ lib/header/nvinfer selects (lib/libtensorrt_rtx.so, @cuda//:cudart).
- ~20 repo BUILD files: rtx_sbsa config_setting + a :rtx_sbsa select entry
mirroring :rtx_x86_64 (sourced from @tensorrt_rtx_sbsa).
- setup.py: add tensorrt_rtx_sbsa_external_dir, used for IS_SBSA + USE_TRT_RTX
(pybind include dir was resolving to @tensorrt_sbsa / enterprise); add a
USE_TRT_RTX branch to get_sbsa_requirements (tensorrt_rtx>=1.5.0.114).
CI (build-only; no aarch64 GPU test runners):
- .github/workflows/build-test-linux-aarch64_rtx.yml: mirrors the standard SBSA
build with use-rtx: true. Same triggers + upload behavior as the x86_64 RTX
workflow; explicit read-only permissions (CodeQL). Superseded by ci-sbsa.yml in
the CI-redesign (test-dx) head commit.
- lint: drop a stray blank line in eliminate_sym_min_int64_max.py.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
64f51d4 to
265360e
Compare
TensorRT-RTX 1.5 ships a Linux aarch64 (SBSA) distribution, but the repo only wired up the x86_64 and Windows RTX archives. This adds the aarch64 RTX archive and threads a rtx_sbsa config_setting (aarch64 + linux + compute_libs=rtx) through the TensorRT selects, so USE_TRT_RTX=1 builds resolve @tensorrt_rtx_sbsa on aarch64.
Build wiring:
Basic CI:
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: