Skip to content

Conversation

@narendasan
Copy link
Collaborator

Description

Should address the intermittent segfaults on CI for the TS tests

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@meta-cla meta-cla bot added the cla signed label Jan 26, 2026
@github-actions github-actions bot added component: tests Issues re: Tests component: core Issues re: The core compiler component: runtime labels Jan 26, 2026
@github-actions github-actions bot requested a review from cehongwang January 26, 2026 18:55
Copy link

@github-actions github-actions bot left a 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/tests/py/ts/api/test_classes.py	2026-01-26 18:55:44.028073+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py	2026-01-26 18:56:27.176197+00:00
@@ -362,13 +362,18 @@
            num_layers = 2
        for trt_mod in (
            TestTorchTensorRTModule._get_trt_mod(),
            TestTorchTensorRTModule._get_trt_mod(via_ts=True),
        ):
-             trt_json = json.loads(trt_mod.get_layer_info())
-             [self.assertTrue(k in trt_json.keys(), f"Key {k} is missing") for k in ["Layers", "Bindings"]]
-             self.assertTrue(len(trt_json["Layers"], "Not enough layers found") == num_layers)
-             self.assertTrue(len(trt_json["Bindings"], "Not enough bindings found") == 2)
+            trt_json = json.loads(trt_mod.get_layer_info())
+            [
+                self.assertTrue(k in trt_json.keys(), f"Key {k} is missing")
+                for k in ["Layers", "Bindings"]
+            ]
+            self.assertTrue(
+                len(trt_json["Layers"], "Not enough layers found") == num_layers
+            )
+            self.assertTrue(len(trt_json["Bindings"], "Not enough bindings found") == 2)


if __name__ == "__main__":
    unittest.main()

Copy link

@github-actions github-actions bot left a 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/tests/py/ts/api/test_classes.py	2026-01-26 18:55:45.318626+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py	2026-01-26 18:56:28.942474+00:00
@@ -362,13 +362,18 @@
            num_layers = 2
        for trt_mod in (
            TestTorchTensorRTModule._get_trt_mod(),
            TestTorchTensorRTModule._get_trt_mod(via_ts=True),
        ):
-             trt_json = json.loads(trt_mod.get_layer_info())
-             [self.assertTrue(k in trt_json.keys(), f"Key {k} is missing") for k in ["Layers", "Bindings"]]
-             self.assertTrue(len(trt_json["Layers"], "Not enough layers found") == num_layers)
-             self.assertTrue(len(trt_json["Bindings"], "Not enough bindings found") == 2)
+            trt_json = json.loads(trt_mod.get_layer_info())
+            [
+                self.assertTrue(k in trt_json.keys(), f"Key {k} is missing")
+                for k in ["Layers", "Bindings"]
+            ]
+            self.assertTrue(
+                len(trt_json["Layers"], "Not enough layers found") == num_layers
+            )
+            self.assertTrue(len(trt_json["Bindings"], "Not enough bindings found") == 2)


if __name__ == "__main__":
    unittest.main()

@lanluo-nvidia lanluo-nvidia merged commit 5eab2ee into main Jan 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants