Disable AVX code paths on iOS simulator.

Fixes b/285639624.

The error there is an incorrect result from TFLite inference on iOS simulator when ruy's AVX code paths (which are written in intrinsics) are enabled.

Although I haven't looked at it in detail, the typical reason why this would happen --- given that this code has not seen any change in years and works as intended on a number of other platforms, including macOS/x86 --- would be a miscompilation by the iOS-simulator toolchain.

It is important to keep this code path enabled on macOS/x86 and only disable it on iOS simulator. We can't filter this by TARGET_OS_MAC as that token is defined in both toolchains. TARGET_IPHONE_SIMULATOR seems to be the appropriate differentiator.

PiperOrigin-RevId: 539714623
1 file changed
tree: e95871da93bd4eea87f24e1898f5911a8ae09dae
  1. cmake/
  2. doc/
  3. example/
  4. ruy/
  5. third_party/
  6. .gitignore
  7. .gitmodules
  8. BUILD
  9. CMakeLists.txt
  10. CONTRIBUTING.md
  11. LICENSE
  12. README.md
  13. WORKSPACE
README.md

The ruy matrix multiplication library

This is not an officially supported Google product.

ruy is a matrix multiplication library. Its focus is to cover the matrix multiplication needs of neural network inference engines. Its initial user has been TensorFlow Lite, where it is used by default on the ARM CPU architecture.

ruy supports both floating-point and 8bit-integer-quantized matrices.

Efficiency

ruy is designed to achieve high performance not just on very large sizes, as is the focus of many established libraries, but on whatever are the actual sizes and shapes of matrices most critical in current TensorFlow Lite applications. This often means quite small sizes, e.g. 100x100 or even 50x50, and all sorts of rectangular shapes. It's not as fast as completely specialized code for each shape, but it aims to offer a good compromise of speed across all shapes and a small binary size.

Documentation

Some documentation will eventually be available in the doc/ directory, see doc/README.md.