pytorch/docs/source/onnx_diagnostics.rst
BowenBao c94b6a6712 [ONNX] Introduce 'diagnostics' to 'dynamo_export' api (#99668)
Summary
* Introduce `DiagnosticContext` to `torch.onnx.dynamo_export`.
* Remove `DiagnosticEngine` in preparations to update 'diagnostics' in `dynamo_export` to drop dependencies on global diagnostic context. No plans to update `torch.onnx.export` diagnostics.

Next steps
* Separate `torch.onnx.export` diagnostics and `torch.onnx.dynamo_export` diagnostics.
* Drop dependencies on global diagnostic context. https://github.com/pytorch/pytorch/pull/100219
* Replace 'print's with 'logger.log'.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99668
Approved by: https://github.com/justinchuby, https://github.com/abock
2023-05-01 19:58:49 +00:00

33 lines
896 B
ReStructuredText

torch.onnx diagnostics
======================
.. contents:: :local:
.. automodule:: torch.onnx._internal.diagnostics
.. currentmodule:: torch.onnx._internal.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) <https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html>`__.
- A new clearer, structured way to add new and keep track of diagnostic rules.
- Serve as foundation for more future improvements consuming the diagnostics.
Diagnostic Rules
----------------
.. toctree::
:glob:
generated/onnx_diagnostics_rules/*
API Reference
-------------
.. autoclass:: torch.onnx._internal.diagnostics.ExportDiagnostic
:members: