-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Improve ov::element::Type to support constexpr where possible (#…
…28643) ### Details: - Make Type class members `constexpr` if possible - Make function `ov::element::from` constexpr instead templtae specialization which allowe use it in compile time - Make global element types as `inline` to use single address - Refactor internals of element Type class - Deprecate function `Type fundamental_type_for(const Type& type);` as not used in project and there element traits can be used as alternative - Reduce code maintenance as add new types requires update less places in code. - This changes have positive impact on binary size of most of OV libraries (negative value means reduced size) | Library | Diff [KiB] | |------------|------------| | OV | -12.825 | | CPU | -0.709 | | NPU | -1.188 | | IR FE | -0.114 | | JAX FE | 0.013 | | ONNX FE | -1.954 | | Paddle FE | -0.907 | | pytorch FE | -0.947 | | TF FE | -2.313 | | TF LITE FE | -0.738 | ### Tickets: - CVS-160757 --------- Signed-off-by: Raasz, Pawel <[email protected]> Co-authored-by: Tomasz Jankowski <[email protected]>
- Loading branch information
1 parent
8c7e4e7
commit a7fe2a2
Showing
6 changed files
with
276 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.