Improve CI DX#4352
Conversation
bab6b00 to
c98b447
Compare
There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-25 22:25:33.200414+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-25 22:25:55.991197+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-25 22:25:33.222901+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-25 22:26:00.920103+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-25 22:31:05.627569+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-25 22:31:27.810024+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-25 22:31:05.647957+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-25 22:31:32.328158+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-26 18:18:12.420127+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-26 18:18:38.112307+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:18:12.440866+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:18:42.935385+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-26 18:35:10.973121+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-26 18:35:34.656487+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:35:10.994104+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:35:39.628278+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-26 18:43:56.293360+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-26 18:44:21.277666+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:43:56.306533+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:44:26.387007+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-26 18:56:03.821999+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-26 18:56:30.939609+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:56:03.842721+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-26 18:56:35.876986+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()c775700 to
6754fac
Compare
There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-29 20:27:03.234833+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-29 20:27:28.200091+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/utils/junit_summary.py 2026-06-29 20:27:03.258834+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/utils/junit_summary.py 2026-06-29 20:27:32.916111+00:00
@@ -43,12 +43,20 @@
return sys.stdout.isatty()
_USE_COLOR = _color_enabled()
_CODES = {
- "reset": "0", "bold": "1", "dim": "2", "red": "31", "green": "32",
- "yellow": "33", "blue": "34", "magenta": "35", "cyan": "36", "grey": "90",
+ "reset": "0",
+ "bold": "1",
+ "dim": "2",
+ "red": "31",
+ "green": "32",
+ "yellow": "33",
+ "blue": "34",
+ "magenta": "35",
+ "cyan": "36",
+ "grey": "90",
}
def c(text: str, *styles: str) -> str:
if not _USE_COLOR or not styles:
@@ -166,12 +174,19 @@
try:
root = ET.parse(xml).getroot()
except ET.ParseError as e:
suite.errors += 1
report.failures.append(
- Failure("PARSE", os.path.basename(xml), f"could not parse XML: {e}",
- "", "", suite.label, xml)
+ Failure(
+ "PARSE",
+ os.path.basename(xml),
+ f"could not parse XML: {e}",
+ "",
+ "",
+ suite.label,
+ xml,
+ )
)
report.suites.append(suite)
continue
for ts in root.iter("testsuite"):
@@ -181,18 +196,34 @@
test = f"{classname}::{name}" if classname else name
file_attr = tc.get("file", "")
fa, er, sk = tc.find("failure"), tc.find("error"), tc.find("skipped")
if fa is not None:
suite.failed += 1
- report.failures.append(Failure(
- "FAIL", test, _first_line(fa.get("message") or fa.text, "failed"),
- (fa.text or "").strip(), file_attr, suite.label, xml))
+ report.failures.append(
+ Failure(
+ "FAIL",
+ test,
+ _first_line(fa.get("message") or fa.text, "failed"),
+ (fa.text or "").strip(),
+ file_attr,
+ suite.label,
+ xml,
+ )
+ )
elif er is not None:
suite.errors += 1
- report.failures.append(Failure(
- "ERROR", test, _first_line(er.get("message") or er.text, "errored"),
- (er.text or "").strip(), file_attr, suite.label, xml))
+ report.failures.append(
+ Failure(
+ "ERROR",
+ test,
+ _first_line(er.get("message") or er.text, "errored"),
+ (er.text or "").strip(),
+ file_attr,
+ suite.label,
+ xml,
+ )
+ )
elif sk is not None:
suite.skipped += 1
else:
suite.passed += 1
report.suites.append(suite)
@@ -228,29 +259,40 @@
print()
return 1
print()
print(rule)
- label_w = min(max(max((_visible_len(s.label) for s in report.suites), default=20), 12), width - 40)
+ label_w = min(
+ max(max((_visible_len(s.label) for s in report.suites), default=20), 12),
+ width - 40,
+ )
for s in sorted(report.suites, key=lambda s: (s.bad == 0, s.label)):
if s.bad:
icon, lstyle = c("✗", "red", "bold"), "red"
elif s.passed == 0 and s.skipped:
icon, lstyle = c("⊘", "yellow"), "yellow"
else:
icon, lstyle = c("✓", "green"), "green"
- cells = " ".join([
- _count(s.passed, "pass", "green"), _count(s.failed, "fail", "red"),
- _count(s.errors, "err", "magenta"), _count(s.skipped, "skip", "yellow"),
- ])
+ cells = " ".join(
+ [
+ _count(s.passed, "pass", "green"),
+ _count(s.failed, "fail", "red"),
+ _count(s.errors, "err", "magenta"),
+ _count(s.skipped, "skip", "yellow"),
+ ]
+ )
print(f" {icon} {_pad(c(s.label, lstyle), label_w)} {cells}")
print(rule)
- totals = " ".join([
- _count(report.passed, "pass", "green"), _count(report.failed, "fail", "red"),
- _count(report.errors, "err", "magenta"), _count(report.skipped, "skip", "yellow"),
- ])
+ totals = " ".join(
+ [
+ _count(report.passed, "pass", "green"),
+ _count(report.failed, "fail", "red"),
+ _count(report.errors, "err", "magenta"),
+ _count(report.skipped, "skip", "yellow"),
+ ]
+ )
meta = c(f"({report.total} tests · {len(report.suites)} suites)", "grey")
print(f" {_pad(c('TOTAL', 'bold'), label_w + 3)}{totals} {meta}")
if report.failures:
print()
@@ -260,24 +302,32 @@
for i, f in enumerate(report.failures, 1):
tag = c(f"{f.kind:<5}", "magenta" if f.kind == "ERROR" else "red", "bold")
print(f" {c(f'{i:>{num_w}}.', 'grey')} {tag} {c(f.suite, 'grey')}")
print(f" {' ' * num_w} {c('•', 'grey')} {c(f.test, 'bold')}")
if f.message:
- print(f" {' ' * num_w} {c(_truncate(f.message, width - num_w - 6), 'yellow')}")
+ print(
+ f" {' ' * num_w} {c(_truncate(f.message, width - num_w - 6), 'yellow')}"
+ )
print(f" {' ' * num_w} {c('↻ ' + _repro(f), 'grey')}")
print()
# Footer: point at the raw results + the agent report.
print(c(" JUnit XMLs:", "grey"), c(report.results_dir, "grey"))
- print(c(" For a paste-to-Claude report:", "grey"),
- c("just test-summary --agent", "cyan"))
+ print(
+ c(" For a paste-to-Claude report:", "grey"),
+ c("just test-summary --agent", "cyan"),
+ )
if report.bad:
- print(c(f" ✗ {report.failed} failed · {report.errors} errored ", "bold", "red")
- + c(f" ({report.total} tests · {len(report.suites)} suites)", "grey"))
+ print(
+ c(f" ✗ {report.failed} failed · {report.errors} errored ", "bold", "red")
+ + c(f" ({report.total} tests · {len(report.suites)} suites)", "grey")
+ )
else:
- print(c(f" ✓ all {report.passed} passed ", "bold", "green")
- + c(f" ({report.total} tests · {len(report.suites)} suites)", "grey"))
+ print(
+ c(f" ✓ all {report.passed} passed ", "bold", "green")
+ + c(f" ({report.total} tests · {len(report.suites)} suites)", "grey")
+ )
print()
return 1 if report.bad else 0
# ── agent (Markdown) rendering ────────────────────────────────────────────────
@@ -287,30 +337,36 @@
out = print # plain, no color, capturable
out("# Torch-TensorRT test report")
out("")
out(f"- results dir: `{report.results_dir}`")
- out(f"- totals: {report.passed} passed, {report.failed} failed, "
+ out(
+ f"- totals: {report.passed} passed, {report.failed} failed, "
f"{report.errors} errored, {report.skipped} skipped "
- f"({report.total} tests across {len(report.suites)} suites)")
+ f"({report.total} tests across {len(report.suites)} suites)"
+ )
if not report.suites:
out("")
out("No JUnit XML files found — the run did not write results.")
return 1
out("- to read a full traceback, open the `junit` path listed for the failure")
- out("- repro commands use `-n0` (serial); drop `-k` to run the whole file, "
- "lower `-n`/free GPU memory if a test OOMs")
+ out(
+ "- repro commands use `-n0` (serial); drop `-k` to run the whole file, "
+ "lower `-n`/free GPU memory if a test OOMs"
+ )
out("")
# Suite table (compact, Markdown).
out("## Suites")
out("")
out("| suite | passed | failed | errors | skipped |")
out("|---|--:|--:|--:|--:|")
for s in sorted(report.suites, key=lambda s: (s.bad == 0, s.label)):
mark = "" if s.bad == 0 else " ⚠"
- out(f"| `{s.label}`{mark} | {s.passed} | {s.failed} | {s.errors} | {s.skipped} |")
+ out(
+ f"| `{s.label}`{mark} | {s.passed} | {s.failed} | {s.errors} | {s.skipped} |"
+ )
out("")
if not report.failures:
out("## Result: all green ✅")
return 0
@@ -332,29 +388,37 @@
out("- detail:")
out("```")
for ln in clipped:
out(ln)
if len(lines) > _AGENT_DETAIL_MAX_LINES:
- out(f"... [{len(lines) - _AGENT_DETAIL_MAX_LINES} more lines; "
- f"read the full traceback in the junit XML above]")
+ out(
+ f"... [{len(lines) - _AGENT_DETAIL_MAX_LINES} more lines; "
+ f"read the full traceback in the junit XML above]"
+ )
out("```")
out("")
return 1
def _results_dir(value) -> str:
if value:
return value
return os.environ.get("RUNNER_TEST_RESULTS_DIR") or os.path.join(
- os.environ.get("TMPDIR", "/tmp"), "trt_test_results")
+ os.environ.get("TMPDIR", "/tmp"), "trt_test_results"
+ )
def main(argv: list) -> int:
p = argparse.ArgumentParser(description="Summarize JUnit XML test results.")
p.add_argument("results_dir", nargs="?", help="dir of JUnit *.xml files")
- p.add_argument("--agent", "--claude", action="store_true", dest="agent",
- help="emit a plain Markdown report for handing to an AI agent")
+ p.add_argument(
+ "--agent",
+ "--claude",
+ action="store_true",
+ dest="agent",
+ help="emit a plain Markdown report for handing to an AI agent",
+ )
args = p.parse_args(argv[1:])
report = parse(_results_dir(args.results_dir))
return render_agent(report) if args.agent else render_pretty(report)
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-29 20:27:03.257256+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-29 20:27:32.991406+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()6754fac to
ac54fef
Compare
There was a problem hiding this comment.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp b/tmp/changes.txt
index 83bf2b7..83b3fe7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/conv_deconv.cpp
+++ b/tmp/changes.txt
@@ -131,8 +131,8 @@ bool add_conv_deconv(ConversionCtx* ctx, const torch::jit::Node* n, args& args)
// the constant-weights path below for why TRT requires this.
if (in->getType() != kernel->getType()) {
LOG_DEBUG(
- "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type ("
- << kernel->getType() << "); casting input to match.");
+ "Conv/deconv input type (" << in->getType() << ") differs from kernel tensor type (" << kernel->getType()
+ << "); casting input to match.");
in = castITensor(ctx, in, kernel->getType());
}
auto kernel_dims = kernel->getDimensions();
ERROR: Some files do not conform to style guidelinesThere 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/runtime/_runtime_config.py 2026-06-29 20:55:34.966498+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/runtime/_runtime_config.py 2026-06-29 20:55:55.983257+00:00
@@ -296,13 +296,11 @@
# already materialized the underlying IRuntimeCache on ``_live``.
wrapped = RuntimeCache(path=rc, autosave_on_del=True)
try:
wrapped.load()
except Exception as e:
- logger.warning(
- f"Failed to warm-load runtime cache from {rc!r}: {e}"
- )
+ logger.warning(f"Failed to warm-load runtime cache from {rc!r}: {e}")
cache = wrapped.ensure_cache(self._live)
self._live.set_runtime_cache(cache)
else:
raise TypeError(
f"runtime_cache must be None, str, or RuntimeCache by the "
--- /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-29 20:55:34.988590+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py 2026-06-29 20:56:00.654964+00:00
@@ -380,12 +380,10 @@
io_key, "Neither 'I/O Tensors' nor 'Bindings' key is present"
)
self.assertTrue(
len(trt_json["Layers"]) == num_layers
), "Not enough layers found"
- self.assertTrue(
- len(trt_json[io_key]) == 2, "Not enough I/O tensors found"
- )
+ self.assertTrue(len(trt_json[io_key]) == 2, "Not enough I/O tensors found")
if __name__ == "__main__":
unittest.main()7de8fcc to
acbf0f1
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PRs previously ran the full 8-variant matrix (py3.10–3.13 × cu130/cu132)
through all L0/L1/L2 tiers. Two changes cut feedback time significantly:
1. Implement --limit-pr-builds in filter-matrix.py: PR builds now use a
single representative config (Python 3.12 × cu130) instead of 8. The
full matrix still runs on main / nightly / release. The flag was already
wired in filter-matrix.py but the logic was never implemented.
2. L2 (slow model-compilation tests) is now opt-in for PRs. Add the
`ci: run-l2` label to enable it; `Force All Tests[L0+L1+L2]` continues
to work as before. `ci: skip-l2` becomes a no-op on PRs (kept for
backward compat, still suppresses L2 on branch-push runs).
Also adds `permissions: {}` to the ci-rollup jobs in both workflows to
satisfy CodeQL's GITHUB_TOKEN scope requirement.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Post /rerun on any PR to re-run failed jobs, or /rerun all to re-run every job from scratch. Requires write access to the repo. Uses the GitHub Actions re-run API so the new run stays linked to the PR's head SHA and updates the existing check statuses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The standard and RTX Linux x86_64 pipelines were ~80% duplicated — every
test command, if-condition, and the rollup script existed in two files, so
changes (like the recent ci: run-l2 / --limit-pr-builds work) had to be
applied twice and drifted over time.
Consolidate into one reusable workflow, _linux-x86_64-core.yml, parameterized
by use-rtx. The two entry workflows shrink to a ~10-line `core:` caller plus a
ci-rollup renderer:
build-test-linux-x86_64.yml → core(use-rtx: false)
build-test-linux-x86_64_rtx.yml → core(use-rtx: true)
RTX differences are expressed two ways, both verified to reproduce the old
behavior byte-for-byte:
* Standard-only jobs (L0/L1/L2 torchscript, dynamo-distributed, executorch
static build) are gated `if: ${{ !inputs.use-rtx && ... }}`.
* Jobs whose pytest scope differs (L0 converter --dist flag; L0/L1 core
partitioning + hlo subsets; L2 core executorch; L2 plugin kernels) branch
inside the script on the $USE_TRT_RTX env var that linux-test.yml exports.
The per-job pass/fail map is bubbled out of the core via a `results` output so
each entry workflow renders ONE rollup status check whose name is unchanged
(`CI / Linux x86_64`, `CI / Linux x86_64 (RTX)`) — branch protection keeps
working. The rollup also fails defensively if the core call concludes
failure/cancelled with an empty results payload, so a reusable-workflow output
edge case can't mask a real failure.
Net: 1263 → 998 lines, single source of truth for all build/test logic.
NOTE: branch-protection required checks are unchanged (CI / Linux x86_64 and
CI / Linux x86_64 (RTX) are still top-level jobs). The individual per-tier
job check names now nest under the `core` caller (e.g. `core / L0 dynamo
converter tests`); if any of those were individually required in branch
protection they'd need updating, but the rollup is the intended required check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nox's per-suite test paths had drifted from what CI actually runs, and the
"reproduce locally with: uv run pytest ..." hint failed because plain uv run
tries to rebuild torch-tensorrt from source.
Add uv-native just recipes (just already drives docs here) that mirror the
pytest selectors in _linux-x86_64-core.yml so contributors can run exactly
what a CI tier runs before pushing:
just lint / lint-changed pre-commit (all files / changed-vs-main)
just test <args> pytest in the uv env
just l0 / l1 full tier reproduction
just l0-converter ... individual sub-suites
Key local-DX fixes baked into the recipes:
* uv run --no-sync — use the already-built .venv instead of rebuilding.
* per-user $TMPDIR (/tmp/torch_tensorrt_$USER) — the engine/timing cache
defaults to a shared /tmp path that PermissionErrors for everyone after
the first user creates it; a per-user dir sidesteps that.
* {{jobs}} knob — single-GPU machines can dial back -n auto to avoid OOM
from too many concurrent TRT engine builds.
Also register the load-bearing `critical`/`unit` pytest markers (CI tiers
split on -m critical / -m "not critical" but they were never declared), fix
the ci_helpers.sh repro hint to use --no-sync, and replace the stale nox
section in CONTRIBUTING (it still listed Python 3.7-3.10) with the just guide.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously the test selectors existed in two places — inline pytest commands
in _linux-x86_64-core.yml and hand-mirrored recipes in the justfile — with only
a "keep these in sync" comment guarding against drift (exactly how nox rotted).
Make tests/py/ci_helpers.sh the single source of truth: one trt_tier_* function
per CI tier, baking in the paths/markers/RTX branching. Both consumers now call
the same functions:
* CI: each linux-test.yml script block is now `source ci_helpers.sh;
trt_tier_<name>` (the 14 inline blocks collapse to 3 lines each).
* Local: the just recipes call `trt_tier_<name>` too.
Only environment policy differs, injected via env vars the library reads:
PYTHON launcher — CI uses container python; just sets
"uv run --no-sync python" (run against the built .venv).
TRT_JOBS xdist workers for the parallel suites (CI 8; just passes its
jobs= knob).
RUNNER_TEST_RESULTS_DIR junit dir (CI-set; locally defaults under $TMPDIR).
TRT_PYTEST_RERUNS flaky-test reruns — default on (CI), the just recipes set
it to 0 (the pytest-rerunfailures plugin may be absent locally
and you want to see flakes, not retry them).
Verified equivalent: a harness resolves every trt_tier_* function for
USE_TRT_RTX in {false,true}, preserving arg boundaries, and diffs the argv
against the original inline commands from git — all 28 tier/variant
combinations match byte-for-byte. Also smoke-ran a tier end-to-end via
`just l0-converter` (engine builds, junit written under the per-user dir).
just now uses bash as its recipe shell (the library is bash). CONTRIBUTING
updated to note local and CI can no longer drift.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
acbf0f1 to
9982af0
Compare
|
/rerun all |
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: