KhronosGroup / OpenVX-sample-impl

OpenVX sample implementation
Apache License 2.0
138 stars 47 forks source link

Update references to NNEF parser #34

Open gyenesvi opened 3 years ago

gyenesvi commented 3 years ago

The C API for the NNEF parser (currently nnef_parser.h and .c in this project) has been merged into the NNEF-Tools project (using the name cnnef.h and .c), which is referenced as a submodule by this project. It was necessary because the CTS also needs to reference those files, and it should not depend on the sample impl. The above files should be removed from this project and it should reference the NNEF-Tools instead (include cnnef.h), available here:

https://github.com/KhronosGroup/NNEF-Tools/blob/master/parser/cpp/include/cnnef.h

Furthermore, the naming and parameterization of the C API functions has been unified. All graph functions start with nnef_graph_ and all tensor functions start with nnef_tensor_. Const specifiers have been added to parameters and return values where appropriate, and the nnef_tensor_dims function has been modified to return the internal const int* instead of copying the dims into a size_t* array.

The code that uses the NNEF parser API should be updated to follow up those changes. The file includes and the function names have to be fixed (maybe also parameter and return types in one or two cases).

The same modifications have to be made in the CTS repo. The CTS repo should not reference the sample implementation repo, only the NNEF-Tools as a submodule (it already does as far as I know).

Jiaqing-Cao commented 3 years ago

Hi Viktor,

We have updated references to NNEF parser according to your latest issue on github.

We pushed the latest code to gitlab with merge requests:

https://gitlab.khronos.org/openvx/sample-impl/-/merge_requests/52 https://gitlab.khronos.org/openvx/cts/-/merge_requests/38

Please review the latest code.

And also there is one build error on Linux about the latest cnnef.cpp in NNEF-Tools: error: ‘strncpy’ was not declared in this scope. By changing the "#include \<string>" into "#include \<cstring>" could solve that error. Could you change that part on your NNEF-Tools repo ?