Skip to content

Deprecate global element types#3444

Merged
ilyachur merged 9 commits intoopenvinotoolkit:masterfrom
ilyachur:feature/ichuraev/deprecate_global_types
Dec 2, 2020
Merged

Deprecate global element types#3444
ilyachur merged 9 commits intoopenvinotoolkit:masterfrom
ilyachur:feature/ichuraev/deprecate_global_types

Conversation

@ilyachur
Copy link
Copy Markdown
Contributor

@ilyachur ilyachur commented Dec 2, 2020

I deprecated global element type variables from nGraph code.
It is needed to avoid issues with tests initialisations when we build inference engine as a static library. For more information have a look this PR: #3219

I already tried to remove these global variables in PR: #3279 but it is not backward compatible changes.

So in this PR I marked as deprecated global element type variables and fixed nGraph build in order to avoid deprecation warnings.

Majority of changes in this PR are changing ngraph::element::[f32,i32,u8, ...] to ngraph::element::Type_t::[f32,i32,u8, ...]

@ilyachur ilyachur marked this pull request as ready for review December 2, 2020 13:22
@ilyachur ilyachur requested a review from a team as a code owner December 2, 2020 13:22
@ilyachur ilyachur requested a review from a team December 2, 2020 13:22
@ilyachur ilyachur changed the title deprecate global element types Deprecate global element types Dec 2, 2020
@ilyachur ilyachur added the category: Core OpenVINO Core (aka ngraph) label Dec 2, 2020
@ilyachur ilyachur added this to the 2021.3 milestone Dec 2, 2020
@ilyachur ilyachur requested a review from tomdol December 2, 2020 15:50
@ilyachur ilyachur merged commit 071fb9d into openvinotoolkit:master Dec 2, 2020
@ilyachur ilyachur deleted the feature/ichuraev/deprecate_global_types branch December 2, 2020 18:27
size_t bitwidth() const;
// The name of this type, the enum name of this type
const std::string& get_type_name() const;
bool operator==(const Type_t& other) const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you try to remove all of comparing functions and let allow compiler to use cast to enum (l:127) to do comparators.

typedef std::vector<Type> TypeVector;

NGRAPH_DEPRECATED(
"This global element type was deprecated. Please use Type_t::undefined instead.")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my curiosity. Why we don't use constexpr and use extern for variables which might be inline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will recheck, if it works I will change it and remove deprecation.

evolosen pushed a commit to evolosen/openvino that referenced this pull request Dec 3, 2020
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
ilyachur added a commit to ilyachur/openvino that referenced this pull request Dec 3, 2020
ilyachur added a commit that referenced this pull request Dec 4, 2020
* Revert "Deprecate global element types (#3444)"

This reverts commit 071fb9d.

* Fixed code style
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 11, 2020
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 11, 2020
…inotoolkit#3468)

* Revert "Deprecate global element types (openvinotoolkit#3444)"

This reverts commit 071fb9d.

* Fixed code style
vzinovie pushed a commit to vzinovie/openvino that referenced this pull request Dec 15, 2020
…inotoolkit#3468)

* Revert "Deprecate global element types (openvinotoolkit#3444)"

This reverts commit 071fb9d.

* Fixed code style
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 16, 2020
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Dec 16, 2020
…inotoolkit#3468)

* Revert "Deprecate global element types (openvinotoolkit#3444)"

This reverts commit 071fb9d.

* Fixed code style
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Jan 14, 2021
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Jan 14, 2021
…inotoolkit#3468)

* Revert "Deprecate global element types (openvinotoolkit#3444)"

This reverts commit 071fb9d.

* Fixed code style
jiwaszki pushed a commit to akuporos/openvino that referenced this pull request Jan 15, 2021
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
jiwaszki pushed a commit to akuporos/openvino that referenced this pull request Jan 15, 2021
…inotoolkit#3468)

* Revert "Deprecate global element types (openvinotoolkit#3444)"

This reverts commit 071fb9d.

* Fixed code style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants