Error loading TRTModelFileDocument form JSON

Hi, I’m trying to visualize the TensorRT engine graph using Nsight Deep Learning Designer, but it failed to load trt.json. I’m still not familiar with how to use DL Designer, so I don’t know what’s wrong.

What I did is as below:

  • Model conversion
  • Visualization
    • Configuration
      • Nsight Deep Learning Designer 2025.3 (on Windows11)
    • I can open onnx file (model_gn.onnx) with DL Designer
    • However, I can’t open trt.json file (model_gn.trt.json)
      • model_gn.trt.json is as below
        {"Layers": ["/cnn/cnn.0/Conv"
        ,"dummy_shape_call__mye1647_0_myl1_0"
        ,"__myl_Gno_myl1_1"
        ,"__myl_MulAddRel_myl1_2"
        ,"Reformatting CopyNode for Output Tensor 0 to {ForeignNode[/cnn/cnn.1/Constant_1_output_0 + ONNXTRT_unsqueezeTensor.../cnn/cnn.2/Relu]}"
        ,"/cnn/cnn.3/Conv"
        ,"dummy_shape_call__mye1644_0_myl4_0"
        ,"__myl_Gno_myl4_1"
        ,"__myl_MulAddRel_myl4_2"
        ,"Reformatting CopyNode for Input Tensor 0 to /cnn/cnn.6/Conv"
        ,"/cnn/cnn.6/Conv"
        ,"dummy_shape_call__mye1647_0_myl7_0"
        ,"__myl_Gno_myl7_1"
        ,"__myl_MulAddRel_myl7_2"
        ,"Reformatting CopyNode for Input Tensor 0 to /cnn/cnn.9/Conv"
        ,"/cnn/cnn.9/Conv"
        ,"dummy_shape_call__mye1647_0_myl10_0"
        ,"__myl_Gno_myl10_1"
        ,"__myl_MulAddRel_myl10_2"
        ,"/pool/GlobalAveragePool"
        ,"dummy_shape_call__mye594_0_myl12_0"
        ,"/linear/Gemm_myl12_1"
        ],
        "Bindings": ["input"
        ,"output"
        ]}
        
      • error is as below
      • If I make Layers array empty (rewrite to "Layers": []), the model_gn.trt.json is successfully loaded and visualized as an empty graph (so, I think it is not the issue of a filepath) .

In TensorRT document (Advanced Topics — NVIDIA TensorRT Documentation), it is written that we can visualize TensorRT engine’s computation graph with Nsight Deep Learning Designer, when detailed TensorRT engine layer information is exported to a JSON file with the --exportLayerInfo option, so I think the way to export a JSON file is not wrong.

I think there might be some format inconsistencies, but I don’t know how I can correct them.

I would really appreciate if I get any suggestions or solutions.

Thanks for reporting this! Add --profilingVerbosity=detailed to your trtexec command line and you should get the necessary JSON format.

The default profiling verbosity level from trtexec is layer_names_only, which saves the list of layers and input/output tensors as in your example, but does not contain sufficient information for DL Designer to visualize meaningfully.

1 Like

Thank you so much for the answer!

with the option --profilingVerbosity=detailed, I can get .trt.json file including detail information of each layer and it is successfully loaded by Nsight Deep Learning Designer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.