• Docs >
  • torch.onnx diagnostics
Shortcuts

torch.onnx diagnostics

Overview

NOTE: This feature is underdevelopment and is subject to change.

The goal is to improve the diagnostics to help users debug and improve their model export to ONNX.

  • The diagnostics are emitted in machine parsable Static Analysis Results Interchange Format (SARIF).

  • A new clearer, structured way to add new and keep track of diagnostic rules.

  • Serve as foundation for more future improvements consuming the diagnostics.

API Reference

class torch.onnx._internal.diagnostics.ExportDiagnostic(*args, frames_to_skip=1, cpp_stack=False, **kwargs)[source]

Base class for all export diagnostics.

This class is used to represent all export diagnostics. It is a subclass of infra.Diagnostic, and adds additional methods to add more information to the diagnostic.

record_cpp_call_stack(frames_to_skip)[source]

Records the current C++ call stack in the diagnostic.

Return type

Stack

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources