Skip to content

Latest commit

 

History

History
201 lines (141 loc) · 8.01 KB

CHANGELOG.md

File metadata and controls

201 lines (141 loc) · 8.01 KB

ONNX GraphSurgeon Change Log

Dates are in YYYY-MM-DD format.

v0.3.11 (2021-07-14)

Changed

  • Updated fold_constants() so that it no longer fails if a shape folding pass fails when error_ok is True.

Fixed

  • Fixed a bug where fold_constants() would fail if a model contained a Slice node without a starts or ends input.

v0.3.10 (2021-05-20)

Added

  • Added support for folding Shape -> Slice patterns even when the entire shape may not be known.

v0.3.9 (2021-04-20)

Changed

  • fold_constants() will no longer store values for foldable tensors whose outputs are all foldable. For example, while folding a constant subgraph like A (constant) -> B -> C, previously, B values would be computed in addition to C. With these changes, only C values are computed and stored. This can reduce memory usage significantly.

v0.3.8 (2021-04-15)

Fixed

  • Fixed a bug where copy() would not work with subgraphs that included tensors with the same names as outer graph tensors unless a tensor_map was provided.

v0.3.7 (2021-03-31)

Added

  • fold_constants() can now fold Shape -> Gather patterns even when the entire shape may not be known.
  • Added an error_ok parameter in fold_constants() which can be set to False to re-raise errors encountered during inference.

Fixed

  • Fixed a bug where copy() would not correctly copy tensors in nested graphs.
  • Fixed a bug where fold_constants() would attempt to fold nodes including graph attributes even if nodes within the nested graph could not be folded.

v0.3.6 (2021-03-27)

Fixed

  • fold_constants() no longer loads constant values into numpy arrays. This can save a significant amount of memory.
  • cleanup() will no longer remove unused graph inputs by default - this was causing invalid ONNX models to be generated in cases with Loop nodes. Set remove_unused_graph_inputs to True to revert to the old behavior.
  • cleanup() will no longer reorder node inputs in cases where they are also graph outputs.

v0.3.5 (2021-03-24)

Added

  • Added support for models with externally stored data. See the README for details on how to import and export such models.

Fixed

  • Operator domains are now preserved when exporting graphs to ONNX.

v0.3.4 (2021-03-10)

Fixed

  • fold_constants will no longer attempt to run inference if there are no constants to compute.

v0.3.3 (2021-03-04)

Fixed

  • Fixed a bug in fold_constants where it would fail if ONNX-Runtime could not run a node with constant inputs. In such cases, the graph is now partitioned to exclude the node before running another pass of constant folding.
  • Fixed a bug where graph output tensors would still point to consumer nodes that had been removed from the graph.
  • Constant folding is now significantly faster in models with large weights.

v0.3.2 (2021-02-13)

Added

  • Added support for folding Shape nodes in fold_constants. This requires that shape inference has been run on the graph, and that the input to the Shape node has a static shape. This behavior can be disabled by setting fold_shapes=False.

Changed

  • cleanup, toposort, and fold_constants are now recursively applied to subgraphs by default. This behavior can be disabled by setting recurse_subgraphs=False.

v0.3.1 (2021-02-12)

Fixed

  • Fixed a bug where do_type_check would not propagate to subgraphs.
  • Fixed a bug where cleanup() would incorrectly remove outer-level nodes if they were used only by inner-nodes of subgraphs.

Removed

  • Removed __deepcopy__ from Graph as it wasn't deep-copying weights or attributes. The method is now called copy and makes a shallow copy of everything except Nodes and Tensor instances.

v0.3.0 (2021-02-12)

Fixed

  • Fixed a bug where shapes including empty strings for dim_param would be treated as empty tensors. They are now correctly imported as tensors with dynamic shapes.
  • Fixed a bug where variable tensors with unknown shapes would be imported as scalars.

v0.2.9 (2021-02-01)

Changed

  • The values property of Constant tensors is now lazily loaded. This can greatly improve model loading times.

v0.2.8 (2020-10-08)

Fixed

  • Fixed a bug where graph inputs and outputs could be assigned SynchronizedList instances, and would therefore be modified if nodes in the graph were.

v0.2.7 (2020-09-29)

Changed

  • Changed the default value of remove_unused_node_outputs in cleanup() to False, as a value of True can lead to unintuitive behavior, especially with looping constructs like Scan and Loop.

v0.2.6 (2020-09-25)

Fixed

  • Fixed a bug where calling graph.tensors() would cause the inputs or outputs of some tensors to be modified.

Changed

  • SynchronizedList.__add__() no longer modifies the left operand.

v0.2.5 (2020-09-21)

Fixed

  • Fixed a bug where nodes including subgraphs whose inputs/outputs had the same names as the node's inputs/outputs would not be imported correctly.

v0.2.4 (2020-09-14)

Fixed

  • fold_constants() will no longer fail if there is nothing to fold in the graph
  • cleanup() will now properly remove the producer nodes of graph inputs.
  • Fixed a bug where graph input/output tensors not attached to nodes would not be correctly exported.

v0.2.3 (2020-06-17)

Added

  • Graph.register() now accepts an opsets argument so that functions can be registered for specific opsets.

Removed

  • has_metadata has been removed from Tensor, since the function is no longer used.

v0.2.2 (2020-06-17)

Fixed

  • ONNX GraphSurgeon now enforces the constraint that graph inputs/outputs must include type information.
  • Fixed a bug where opset was not being considering when running inference for constant folding.

v0.2.1 (2020-06-10)

Added

  • Added layer() function to Graph to make it easier to generate models from scratch
  • Added i() and o() convenience functions to Tensor, which are similar to the functions for Node, but return Tensors instead of Nodes

v0.2.0 (2020-04-15)

Added

  • Added an examples directory
  • Added has_metadata() to Tensor classes to determine if dtype/shape are known.
  • Added a check_duplicates parameter to Graph.tensors() to make it easy to check for duplicate tensors in the graph.

Changed

  • Various improvements to the logger
  • Updated OnnxImporter so that it can correctly import shapes and types from an ONNX graph after shape inference.
  • Made Tensor an abstract class - all tensors in a graph are now either Variable or Constant
  • Renames generate_tensor_map() to tensors() in Graph
  • Removed Tensor suffix from Tensor classes.

v0.1.3 (2020-02-26)

Fixed

  • The import_onnx and export_onnx functions will now preserve opset information and dim_param values in shapes.

v0.1.2 (2020-02-19)

Added

  • Added i() and o() convenience functions to Node for retrieving input/output nodes.
  • Added fold_constants() to Graph to allow for folding constants in the graph.
  • Added __deepcopy__() to Graph.
  • Added to_constant() and to_variable() functions to Variable and Constant respectively to transmute them in-place.

v0.1.1 (2020-02-11)

Changed

  • Removed some type annotations to allow compatibility with Python 3.5.

v0.1.0 (2020-02-11)

Added

  • Added Node, Tensor and Graph classes.
  • Added BaseImporter and OnnxImporter classes.
  • Added support for importing initializers in the OnnxImporter
  • Added Variable and Constant
  • Consolidates inputs/outputs of Nodes/Tensors. Now, inputs/outputs should generally only be added to Nodes.
  • Added OnnxExporter to export Graph to onnx.GraphProto
  • Added OnnxExporter and OnnxImporter to public imports
  • Added toposort function to Graph, which will topologically sort it.
  • Added cleanup function to Graph, which will remove unused nodes and tensors.
  • Added high-level API for importing/exporting Graphs from/to ONNX models.
  • Graphs are now generated with a default name of onnx_graphsurgeon