Add hexagon_nn_version which can be used to query the libhexagon_nn_skel version to make sure of compatibility of on device library with the ops to execute.
PiperOrigin-RevId: 291460474 Change-Id: Id55fb72e33c99d0ee0b92ef2099acc5ac7ef1df3
This commit is contained in:
parent
f851013e7c
commit
621fd03981
@ -76,6 +76,7 @@ cc_library(
|
||||
":hexagon_implementation",
|
||||
":utils",
|
||||
"//tensorflow/lite:kernel_api",
|
||||
"//tensorflow/lite:minimal_logging",
|
||||
"//tensorflow/lite/c:common",
|
||||
],
|
||||
)
|
||||
|
||||
@ -74,6 +74,7 @@ HexagonNN CreateNewHexagonInterface() {
|
||||
LOAD_FUNCTION(libhexagon_interface, hexagon_nn_global_init, hexagon_nn);
|
||||
LOAD_FUNCTION(libhexagon_interface, hexagon_nn_is_device_supported,
|
||||
hexagon_nn);
|
||||
LOAD_FUNCTION(libhexagon_interface, hexagon_nn_version, hexagon_nn);
|
||||
hexagon_nn.interface_loaded = true;
|
||||
return hexagon_nn;
|
||||
}
|
||||
|
||||
@ -126,6 +126,8 @@ struct HexagonNN {
|
||||
// Otherwise.
|
||||
hexagon_nn_is_device_supported_fn* hexagon_nn_is_device_supported;
|
||||
|
||||
hexagon_nn_version_fn* hexagon_nn_version = nullptr;
|
||||
|
||||
bool interface_loaded = false;
|
||||
};
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ VERS_1.0 {
|
||||
hexagon_nn_global_teardown;
|
||||
hexagon_nn_global_init;
|
||||
hexagon_nn_is_device_supported;
|
||||
hexagon_nn_version;
|
||||
|
||||
# Hide everything else.
|
||||
local:
|
||||
|
||||
@ -54,4 +54,6 @@ using hexagon_nn_global_init_fn = decltype(hexagon_nn_global_init);
|
||||
using hexagon_nn_is_device_supported_fn =
|
||||
decltype(hexagon_nn_is_device_supported);
|
||||
|
||||
using hexagon_nn_version_fn = decltype(hexagon_nn_version);
|
||||
|
||||
#endif // TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_HEXAGON_HEXAGON_NN_INTERFACE_H_
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user