[Build] Android build Failure on ONNX Runtime 1.20.2 compiler doesn't support BFLOAT16 #23851
Labels
build
build issues; typically submitted using template
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
Describe the issue
The build of android runtime with ONNX runtime 1.20.2 (but also 1.18, 1.16) fails with error "compiler doesn't support BFLOAT16 type, working on a Mac M1 Pro.
Urgency
No response
Target platform
ONNX Runtime 1.20.2
Build script
./build.sh --config MinSizeRel --build_shared_lib --minimal_build extended --disable_ml_ops --disable_exceptions --disable_rtti --skip_tests --use_nnapi --android --android_sdk_path /xxx/sdk --android_ndk_path xxx/ndk/26.2.11394342 --android_api 24 --android_abi arm64-v8a
Error / output
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /xxx/onnxruntime/build/Android/MinSizeRel/_deps/onnx-subbuild
[100%] Built target onnx-populate
Finished fetching external dependencies
NVCC_ERROR =
NVCC_OUT = no such file or directory
CMake Error at CMakeLists.txt:659 (message):
The compiler doesn't support BFLOAT16!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "xxx/onnxruntime/tools/ci_build/build.py", line 2950, in
sys.exit(main())
File "xxx/onnxruntime/tools/ci_build/build.py", line 2807, in main
generate_build_tree(
File "xxx/onnxruntime/tools/ci_build/build.py", line 1666, in generate_build_tree
run_subprocess(
File "xxx/onnxruntime/tools/ci_build/build.py", line 861, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "xxx/onnxruntime/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xxx/cmake/3.31.5/bin/cmake', 'xxx/onnxruntime/cmake', '-Donnxruntime_RUN_ONNX_TESTS=OFF', '-Donnxruntime_GENERATE_TEST_REPORTS=ON', '-DPython_EXECUTABLE=/Library/Developer/CommandLineTools/usr/bin/python3', '-DPYTHON_EXECUTABLE=/Library/Developer/CommandLineTools/usr/bin/python3', '-Donnxruntime_USE_MIMALLOC=OFF', '-Donnxruntime_ENABLE_PYTHON=OFF', '-Donnxruntime_BUILD_CSHARP=OFF', '-Donnxruntime_BUILD_JAVA=OFF', '-Donnxruntime_BUILD_NODEJS=OFF', '-Donnxruntime_BUILD_OBJC=OFF', '-Donnxruntime_BUILD_SHARED_LIB=ON', '-Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF', '-Donnxruntime_USE_DNNL=OFF', '-Donnxruntime_USE_NNAPI_BUILTIN=ON', '-Donnxruntime_USE_RKNPU=OFF', '-Donnxruntime_USE_LLVM=OFF', '-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF', '-Donnxruntime_USE_VITISAI=OFF', '-Donnxruntime_USE_TENSORRT=OFF', '-Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON', '-Donnxruntime_USE_TVM=OFF', '-Donnxruntime_TVM_CUDA_RUNTIME=OFF', '-Donnxruntime_TVM_USE_HASH=OFF', '-Donnxruntime_USE_MIGRAPHX=OFF', '-Donnxruntime_DISABLE_CONTRIB_OPS=OFF', '-Donnxruntime_DISABLE_ML_OPS=ON', '-Donnxruntime_DISABLE_RTTI=ON', '-Donnxruntime_DISABLE_EXCEPTIONS=ON', '-Donnxruntime_MINIMAL_BUILD=ON', '-Donnxruntime_EXTENDED_MINIMAL_BUILD=ON', '-Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF', '-Donnxruntime_REDUCED_OPS_BUILD=OFF', '-Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF', '-Donnxruntime_USE_DML=OFF', '-Donnxruntime_USE_WINML=OFF', '-Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF', '-Donnxruntime_USE_TELEMETRY=OFF', '-Donnxruntime_ENABLE_LTO=OFF', '-Donnxruntime_USE_ACL=OFF', '-Donnxruntime_USE_ACL_1902=OFF', '-Donnxruntime_USE_ACL_1905=OFF', '-Donnxruntime_USE_ACL_1908=OFF', '-Donnxruntime_USE_ACL_2002=OFF', '-Donnxruntime_USE_ACL_2308=OFF', '-Donnxruntime_USE_ARMNN=OFF', '-Donnxruntime_ARMNN_RELU_USE_CPU=ON', '-Donnxruntime_ARMNN_BN_USE_CPU=ON', '-Donnxruntime_USE_JSEP=OFF', '-Donnxruntime_ENABLE_NVTX_PROFILE=OFF', '-Donnxruntime_ENABLE_TRAINING=OFF', '-Donnxruntime_ENABLE_TRAINING_OPS=OFF', '-Donnxruntime_ENABLE_TRAINING_APIS=OFF', '-Donnxruntime_ENABLE_CPU_FP16_OPS=OFF', '-Donnxruntime_USE_NCCL=OFF', '-Donnxruntime_BUILD_BENCHMARKS=OFF', '-Donnxruntime_USE_ROCM=OFF', '-DOnnxruntime_GCOV_COVERAGE=OFF', '-Donnxruntime_USE_MPI=OFF', '-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF', '-Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF', '-Donnxruntime_USE_CUDA_NHWC_OPS=OFF', '-Donnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON', '-Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING=ON', '-Donnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=OFF', '-Donnxruntime_ENABLE_LAZY_TENSOR=OFF', '-Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF', '-Donnxruntime_ENABLE_CUDA_PROFILING=OFF', '-Donnxruntime_ENABLE_ROCM_PROFILING=OFF', '-Donnxruntime_USE_XNNPACK=OFF', '-Donnxruntime_USE_WEBNN=OFF', '-Donnxruntime_USE_CANN=OFF', '-Donnxruntime_USE_TRITON_KERNEL=OFF', '-Donnxruntime_DISABLE_FLOAT8_TYPES=ON', '-Donnxruntime_DISABLE_SPARSE_TENSORS=OFF', '-Donnxruntime_DISABLE_OPTIONAL_TYPE=OFF', '-DCMAKE_TOOLCHAIN_FILE=xxx/ndk/26.2.11394342/build/cmake/android.toolchain.cmake', '-DANDROID_PLATFORM=android-24', '-DANDROID_ABI=arm64-v8a', '-DANDROID_MIN_SDK=24', '-DCMAKE_TLS_VERIFY=ON', '-DFETCHCONTENT_QUIET=OFF', '-DCMAKE_BUILD_TYPE=MinSizeRel', '-DCMAKE_PREFIX_PATH=xxx/onnxruntime/build/Android/MinSizeRel/installed']' returned non-zero exit status 1.
Visual Studio Version
No response
GCC / Compiler Version
gcc-14 (Homebrew GCC 14.2.0_1) 14.2.0 Copyright (C) 2024 Free Software Foundation, Inc.
The text was updated successfully, but these errors were encountered: