openvino icon indicating copy to clipboard operation
openvino copied to clipboard

[CAPI]Unicode support

Open riverlijunjie opened this issue 2 years ago • 5 comments

Details:

  • Support unicode code for input path

Tickets:

  • 89488

riverlijunjie avatar Sep 09 '22 02:09 riverlijunjie

I also notice below C interfaces also will face unicode problem, but C++ doesn't provide explicitly unicode interface:

OPENVINO_C_API(ov_status_e) ov_core_create_with_config(const char* xml_config_file, ov_core_t** core);
OPENVINO_C_API(ov_status_e)  ov_core_compile_model_from_file(const ov_core_t* core,
                                const char* model_path,
                                const char* device_name,
                                const ov_properties_t* property,
                                ov_compiled_model_t** compiled_model);

Do we need support in C interface?

riverlijunjie avatar Sep 09 '22 02:09 riverlijunjie

I also notice below C interfaces also will face unicode problem, but C++ doesn't provide explicitly unicode interface:

OPENVINO_C_API(ov_status_e) ov_core_create_with_config(const char* xml_config_file, ov_core_t** core);
OPENVINO_C_API(ov_status_e)  ov_core_compile_model_from_file(const ov_core_t* core,
                                const char* model_path,
                                const char* device_name,
                                const ov_properties_t* property,
                                ov_compiled_model_t** compiled_model);

Do we need support in C interface?

Yes I think we need also have these C API. Because user can skip read_model and put the model path to compile_model function

ilyachur avatar Sep 12 '22 03:09 ilyachur

I also notice below C interfaces also will face unicode problem, but C++ doesn't provide explicitly unicode interface:

OPENVINO_C_API(ov_status_e) ov_core_create_with_config(const char* xml_config_file, ov_core_t** core);
OPENVINO_C_API(ov_status_e)  ov_core_compile_model_from_file(const ov_core_t* core,
                                const char* model_path,
                                const char* device_name,
                                const ov_properties_t* property,
                                ov_compiled_model_t** compiled_model);

Do we need support in C interface?

Yes I think we need also have these C API. Because user can skip read_model and put the model path to compile_model function

There are 2 ways to support it, which is better from your perspective?

  1. direct unicode support in C libs
  2. First enabled unicode in these C++ interfaces and then call them in C libs

riverlijunjie avatar Sep 13 '22 00:09 riverlijunjie

Can we add tests on this API?

yes, we need unicode test in CI, not only C++/python test, but also C interface test. We can provide such test sample, but need more support from CI team to create unicode path.

riverlijunjie avatar Sep 13 '22 00:09 riverlijunjie

Blocked by https://github.com/openvinotoolkit/openvino/pull/12887, in which some Windows build error can be avoided.

riverlijunjie avatar Sep 14 '22 12:09 riverlijunjie

@riverlijunjie I think comments can be solved in the next PR.

OK, I will submit new PR to resolve above issue

riverlijunjie avatar Sep 28 '22 03:09 riverlijunjie