onnxruntime/include/onnxruntime/core
Xavier Dupré 5930e7e22f
Introduce RemovableAttributes (#14868)
### Description
TreeEnsemble* kernels fully copies all the parameters from the onnx
graph. Even if they are no longer needed or unused (hitrates), they
remain in memory. For big models >= 200 trees, max_depth > 10, the model
usually weights more than 10 Mb. This change offers a kernel the
possibility to remove all unneeded attributes after they were used to
create the session. Attributes are deleted after the model was possibly
saved, at the of the session creation.

The current design is to be debatted:
* it stored the list of removable attributes in class
`onnxruntime::Node`,
* the node is marked as `const` everytime this implementation needs to
register the name of a removable attribute or to remove them.

The current implementation is just a POC as it needs to cast
`onnxruntime::Node*` into `const onnxruntime::Node*`.

Should we keep the list of removable attributes in `onnxruntime::Node`?

### Motivation and Context
Motivation is mostly to reduce memory consumption.

---------

Signed-off-by: xadupre <xadupre@microsoft.com>
2023-03-07 12:37:12 +01:00
..
common Improve compatibility with certain STL's 2023-02-21 14:06:16 -08:00
eager
framework Introduce RemovableAttributes (#14868) 2023-03-07 12:37:12 +01:00
graph Introduce RemovableAttributes (#14868) 2023-03-07 12:37:12 +01:00
optimizer Pass SessionOptions to XnnpackProviderFactoryCreator. (#13318) 2022-12-10 14:23:46 +08:00
platform Improve thread pool creation failure handling. (#13313) 2022-10-15 17:57:19 -07:00
providers [oneDNN] Improved thread handling (#13618) 2023-01-31 14:37:13 -08:00
session Add GetVersionSting API for C++, C# and Python (#14873) 2023-03-02 17:11:07 -08:00