-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move api set_element_type() & set_tensor_type() from public to private #22645
Move api set_element_type() & set_tensor_type() from public to private #22645
Conversation
… public to private Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
@ilya-lavrenov @vurusovs if this solution is fine, I will clean the "deprecated" lable |
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR implements the idea well. Thank you!
Let's see what @ilya-lavrenov and @vurusovs think of this
OPENVINO_API void set_element_type(Tensor& tensor, const element::Type& elemenet_type); | ||
|
||
// To change Tensor type please change the Parameter type. | ||
OPENVINO_API void set_tensor_type(Tensor& tensor, const element::Type& element_type, const PartialShape& pshape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is OPENVINO_API
required? It makes functions public for users, but original intention was to hide it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vurusovs Without "OPENVINO_API" (which will not export the func) will cause some linker error, as following:
I also tried to move the implement of "remember_input_data_types()" & "restore_input_data_types()" from hpp to cpp, but get the same error. https://github.com/zhaixuejun1993/openvino/blob/1cf81e8400680eb49ce9245ea4ccf85216987b60/src/common/transformations/include/ov_ops/type_relaxed.hpp#L83-L125
I don't know why for "class ov::op::TypeRelaxedBase" & "class ov::op::TemporaryReplaceOutputType" we need to put the implementation in hpp.
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Will be merged in scope of #22722 |
Details:
Tickets: