You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.13
Custom code
Yes
OS platform and distribution
Linux 6.3.1, EndeavourOS
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
clang version 14.0.7
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
Building libtensorflow-lite.a with CMake with GPU delegate enabled requires AHardwareBuffer_* functions only available with 26+ Android API level, though minSdkVersion is stated to be 19 for tensorflow-lite-gpu here. Tested on branches r2.13, nighly and master. Branch r2.12 builds without issues.
Standalone code to reproduce the issue
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_NDK_VERSION=25 -DTFLITE_ENABLE_GPU=ON -DCMAKE_BUILD_TYPE=Release ../tensorflow/lite/
make
Relevant log output
tensorflow/lite/delegates/gpu/delegate.cc:787:7: error: 'AHardwareBuffer_acquire' is unavailable: introduced in Android 26
AHardwareBuffer_acquire(ahwb);
^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/hardware_buffer.h:386:6: note: 'AHardwareBuffer_acquire' has been explicitly marked unavailable here
void AHardwareBuffer_acquire(AHardwareBuffer* _Nonnull buffer) __INTRODUCED_IN(26);
^
tensorflow/lite/delegates/gpu/delegate.cc:795:9: error: 'AHardwareBuffer_release' is unavailable: introduced in Android 26
AHardwareBuffer_release(b);
^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/hardware_buffer.h:394:6: note: 'AHardwareBuffer_release' has been explicitly marked unavailable here
void AHardwareBuffer_release(AHardwareBuffer* _Nonnull buffer) __INTRODUCED_IN(26);
^
tensorflow/lite/delegates/gpu/delegate.cc:803:7: error: 'AHardwareBuffer_describe' is unavailable: introduced in Android 26
AHardwareBuffer_describe(uptr_ahwb.get(), &desc_ahwb);
^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/hardware_buffer.h:402:6: note: 'AHardwareBuffer_describe' has been explicitly marked unavailable here
void AHardwareBuffer_describe(const AHardwareBuffer* _Nonnull buffer,
^
tensorflow/lite/delegates/gpu/delegate.cc:1185:18: error: 'AHardwareBuffer_lock' is unavailable: introduced in Android 26
return AHardwareBuffer_lock(buffer, this->usage_, -1 /* fence */,
^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/hardware_buffer.h:457:5: note: 'AHardwareBuffer_lock' has been explicitly marked unavailable here
int AHardwareBuffer_lock(AHardwareBuffer* _Nonnull buffer, uint64_t usage, int32_t fence,
^
tensorflow/lite/delegates/gpu/delegate.cc:1212:24: error: 'AHardwareBuffer_unlock' is unavailable: introduced in Android 26
return AHardwareBuffer_unlock(buffer, nullptr /* fence */);
^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/android/hardware_buffer.h:479:5: note: 'AHardwareBuffer_unlock' has been explicitly marked unavailable here
int AHardwareBuffer_unlock(AHardwareBuffer* _Nonnull buffer, int32_t* _Nullable fence)
The text was updated successfully, but these errors were encountered:
This issue originally reported by @GoldFeniks has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.
We appreciate your understanding and look forward to your continued involvement.
Issue type
Build/Install
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.13
Custom code
Yes
OS platform and distribution
Linux 6.3.1, EndeavourOS
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
clang version 14.0.7
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
Building libtensorflow-lite.a with CMake with GPU delegate enabled requires
AHardwareBuffer_*
functions only available with 26+ Android API level, though minSdkVersion is stated to be 19 for tensorflow-lite-gpu here. Tested on branches r2.13, nighly and master. Branch r2.12 builds without issues.Standalone code to reproduce the issue
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_NDK_VERSION=25 -DTFLITE_ENABLE_GPU=ON -DCMAKE_BUILD_TYPE=Release ../tensorflow/lite/ make
Relevant log output
The text was updated successfully, but these errors were encountered: