-
Notifications
You must be signed in to change notification settings - Fork 364
tensorrt_rtx try on #3679
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
Draft
lanluo-nvidia
wants to merge
9
commits into
main
Choose a base branch
from
lluo/tensorrt_rtx_python_try
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
tensorrt_rtx try on #3679
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/cpp/bin/torchtrtc/main.cpp b/tmp/changes.txt
index 60c76da..63e4448 100644
--- a/home/runner/work/TensorRT/TensorRT/cpp/bin/torchtrtc/main.cpp
+++ b/tmp/changes.txt
@@ -374,7 +374,9 @@ int main(int argc, char** argv) {
// } else {
// torchtrt::logging::log(
// torchtrt::logging::Level::kINFO,
- // "Int8 precision has been enabled but no calibrator provided. This assumes the network has Q/DQ nodes obtained from Quantization aware training. For more details, refer to https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work-with-qat-networks");
+ // "Int8 precision has been enabled but no calibrator provided. This assumes the network has Q/DQ nodes
+ // obtained from Quantization aware training. For more details, refer to
+ // https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work-with-qat-networks");
// }
} else {
std::stringstream ss;
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/conversionctx/ConversionCtx.cpp b/tmp/changes.txt
index c821698..9fdcac7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/conversionctx/ConversionCtx.cpp
+++ b/tmp/changes.txt
@@ -59,16 +59,16 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
for (auto p = settings.enabled_precisions.begin(); p != settings.enabled_precisions.end(); ++p) {
switch (*p) {
case nvinfer1::DataType::kHALF:
- // tensorrt_rtx is strong typed, cannot set fp16 by builder config, only do this for tensorrt build
- #ifndef TRT_MAJOR_RTX
+// tensorrt_rtx is strong typed, cannot set fp16 by builder config, only do this for tensorrt build
+#ifndef TRT_MAJOR_RTX
TORCHTRT_CHECK(
builder->platformHasFastFp16(), "Requested inference in FP16 but platform does not support FP16");
cfg->setFlag(nvinfer1::BuilderFlag::kFP16);
break;
- #endif
+#endif
case nvinfer1::DataType::kINT8:
- // tensorrt_rtx is strong typed, cannot set int8 by builder config, only do this for tensorrt build
- #ifndef TRT_MAJOR_RTX
+// tensorrt_rtx is strong typed, cannot set int8 by builder config, only do this for tensorrt build
+#ifndef TRT_MAJOR_RTX
TORCHTRT_CHECK(
builder->platformHasFastInt8(), "Requested inference in INT8 but platform does not support INT8");
cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
@@ -81,7 +81,7 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
cfg->setInt8Calibrator(settings.calibrator);
}
break;
- #endif
+#endif
case nvinfer1::DataType::kFLOAT:
break;
case nvinfer1::DataType::kINT32:
ERROR: Some files do not conform to style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/__init__.py 2025-07-11 22:54:04.884045+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/__init__.py 2025-07-11 22:54:29.748057+00:00
@@ -42,12 +42,13 @@
import torch
try:
from . import trt_alias # noqa: F401
-
+
import tensorrt # noqa: F401
+
print(f"You are using {tensorrt.__name__=} {tensorrt.__version__=}")
except ImportError:
tensorrt_version = _parse_semver(__tensorrt_version__)
tensorrt_rtx_version = _parse_semver(__tensorrt_rtx_version__)
--- /home/runner/work/TensorRT/TensorRT/setup.py 2025-07-11 22:54:04.902045+00:00
+++ /home/runner/work/TensorRT/TensorRT/setup.py 2025-07-11 22:54:34.510910+00:00
@@ -548,11 +548,17 @@
tensorrt_linux_external_dir = tensorrt_x86_64_external_dir
if USE_RTX:
tensorrt_windows_external_dir = (
lambda: subprocess.check_output(
- [BAZEL_EXE, "query", "@tensorrt_rtx_win//:nvinfer", "--output", "location"]
+ [
+ BAZEL_EXE,
+ "query",
+ "@tensorrt_rtx_win//:nvinfer",
+ "--output",
+ "location",
+ ]
)
.decode("ascii")
.strip()
.split("/BUILD.bazel")[0]
)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla signed
component: api [C++]
Issues re: C++ API
component: api [Python]
Issues re: Python API
component: build system
Issues re: Build system
component: conversion
Issues re: Conversion stage
component: converters
Issues re: Specific op converters
component: core
Issues re: The core compiler
component: dynamo
Issues relating to the `torch.compile` or `torch._dynamo.export` paths
component: evaluators
Issues re: Specific op evaluators
component: lowering
Issues re: The lowering / preprocessing passes
component: partitioning
component: runtime
component: tests
Issues re: Tests
WIP
Work is in progress, pull request should not be merged yet
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
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: