Skip to content

Conversation

@apbose
Copy link
Collaborator

@apbose apbose commented Jan 9, 2026

Addresses two tests

  1. Blackwell leads to different no of layers in the test. Need to check this if this is desirable (ideally should be 2)
  2. Orin does not have the INCLUDE_REFIT flag due to old TRT 10.11. So INCLUDE_REFITflag is not set after refitting and serializing engine. So the below test is disabled

@meta-cla meta-cla bot added the cla signed label Jan 9, 2026
@github-actions github-actions bot added the component: tests Issues re: Tests label Jan 9, 2026
@github-actions github-actions bot requested a review from lanluo-nvidia January 9, 2026 01:10
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-09 01:09:55.737085+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/ts/api/test_classes.py	2026-01-09 01:10:42.996612+00:00
@@ -8,24 +8,26 @@


def is_blackwell():
    """
    Check if running on NVIDIA Blackwell architecture (sm_90+).
-    
+
    Blackwell architecture adds input/output reformat layers in TensorRT engines.
-    
+
    Returns:
        bool: True if running on Blackwell (sm_90+), False otherwise
    """
    if not torch.cuda.is_available():
        return False
-    
+
    device_properties = torch.cuda.get_device_properties(0)
    compute_capability = device_properties.major * 10 + device_properties.minor
-    
+
    # Blackwell is sm_90 and above
    return compute_capability >= 90
+
+
@unittest.skipIf(
    not torchtrt.ENABLED_FEATURES.torchscript_frontend,
    "TorchScript Frontend is not available",
)
class TestInput(unittest.TestCase):
@@ -346,16 +348,17 @@
            ]
        }
        """

        import json
+
        if is_blackwell():
-            # blackwell has additional layers- 
-            #Layer 0: __mye88_myl0_0           ← Input reformat layer
-            #Layer 1: aten__matmul(...) fc1    ← First matmul (fc1)
-            #Layer 2: aten__matmul(...) fc2    ← Second matmul (fc2)
-            #Layer 3: __mye90_myl0_3           ← Output reformat layer
+            # blackwell has additional layers-
+            # Layer 0: __mye88_myl0_0           ← Input reformat layer
+            # Layer 1: aten__matmul(...) fc1    ← First matmul (fc1)
+            # Layer 2: aten__matmul(...) fc2    ← Second matmul (fc2)
+            # Layer 3: __mye90_myl0_3           ← Output reformat layer
            num_layers = 4
        else:
            num_layers = 2
        for trt_mod in (
            TestTorchTensorRTModule._get_trt_mod(),

@apbose apbose force-pushed the abose/torchTRT_DLFW_26.01_changes branch from 83fe8a2 to f713c0d Compare January 9, 2026 01:16
Copy link
Collaborator

@lanluo-nvidia lanluo-nvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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