XNNPACK
XNNPACK copied to clipboard
Enable support for Emscripten in CMake
Addresses #3455
Takes the approach of detecting the use of Wasm SIMD by detecting if the requisite flags have been added to CMAKE_C_FLAGS or CMAKE_CXX_FLAGS. Adding the SIMD flags to these variables is the right way to enable Wasm SIMD globally for CMake builds, so this should do the right thing.
The use of SET(XNNPACK_ENABLE_RISCV_VECTOR OFF) is to suppress a compile error; without this RISC-specific code is compiled for Wasm; turning this option off here seemed the minimally invasive solution.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.