From 8aec56b6d7b9b5165b2c5fae24c5e03e25463626 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Sat, 7 Jan 2023 20:28:05 +1100 Subject: [PATCH] fix compile issue on ARM --- build_tensorflowlite.sh | 6 +++--- shard.yml | 2 +- src/tensorflow_lite/lib_tensorflowlite.cr | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build_tensorflowlite.sh b/build_tensorflowlite.sh index 5f2e8d3..8f473fa 100644 --- a/build_tensorflowlite.sh +++ b/build_tensorflowlite.sh @@ -22,13 +22,13 @@ echo "--" mkdir tflite_build cd tflite_build -cmake ../tensorflow/tensorflow/lite/c +cmake ../tensorflow/tensorflow/lite/c -DTFLITE_ENABLE_GPU=ON echo "--" echo "building..." echo "--" -cmake --build . -j +cmake --build . -j2 || true FILE=./libtensorflowlite_c.so if test -f "$FILE"; then @@ -36,7 +36,7 @@ if test -f "$FILE"; then echo "build success!" else echo "build failed, retrying..." - cmake --build . -j + cmake --build . -j1 if test -f "$FILE"; then echo "--" diff --git a/shard.yml b/shard.yml index 25ad04f..2f8adde 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: tensorflow_lite -version: 0.9.1 +version: 0.9.2 development_dependencies: ameba: diff --git a/src/tensorflow_lite/lib_tensorflowlite.cr b/src/tensorflow_lite/lib_tensorflowlite.cr index 82d49fd..ee011dc 100644 --- a/src/tensorflow_lite/lib_tensorflowlite.cr +++ b/src/tensorflow_lite/lib_tensorflowlite.cr @@ -204,7 +204,7 @@ lib LibTensorflowLite type Delegate = Void* fun interpreter_options_add_opaque_delegate = TfLiteInterpreterOptionsAddOpaqueDelegate(options : InterpreterOptions, opaque_delegate : OpaqueDelegateStruct) type OpaqueDelegateStruct = Void* - fun interpreter_options_set_error_reporter = TfLiteInterpreterOptionsSetErrorReporter(options : InterpreterOptions, reporter : (Void*, LibC::Char*, VaList -> Void), user_data : Void*) + fun interpreter_options_set_error_reporter = TfLiteInterpreterOptionsSetErrorReporter(options : InterpreterOptions, reporter : (Void*, LibC::Char*, Void* -> Void), user_data : Void*) fun interpreter_options_add_registration_external = TfLiteInterpreterOptionsAddRegistrationExternal(options : InterpreterOptions, registration : RegistrationExternal) type RegistrationExternal = Void* fun interpreter_options_enable_cancellation = TfLiteInterpreterOptionsEnableCancellation(options : InterpreterOptions, enable : LibC::Int) : Status