Skip to content

Commit

Permalink
Download the xnnpack dependency libraries for risc-v cross-compiling.
Browse files Browse the repository at this point in the history
Download the xnnpack dependency libraries to enable riscv64
cross-building on Linux with xnnpack EP.

Signed-off-by: Phoebe Chen <[email protected]>
  • Loading branch information
phoebesv committed Jan 24, 2024
1 parent adcc6af commit 4a0f953
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/external/xnnpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ set(FP16_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
set(PTHREADPOOL_BUILD_TESTS OFF CACHE INTERNAL "")
set(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE INTERNAL "")

if(CMAKE_SYSTEM_PROCESSOR MATCHES "^riscv64.*")
set(XNNPACK_USE_SYSTEM_LIBS OFF)
endif()

# BF16 instructions cause ICE in Android NDK compiler
if(CMAKE_ANDROID_ARCH_ABI STREQUAL armeabi-v7a)
set(XNNPACK_ENABLE_ARM_BF16 OFF)
ENDIF()
endif()

# fp16 depends on psimd
FetchContent_Declare(psimd URL ${DEP_URL_psimd} URL_HASH SHA1=${DEP_SHA1_psimd})
Expand Down

0 comments on commit 4a0f953

Please sign in to comment.