commit | e273e15fd20ba05a79c22f45af021a261aa21f55 | [log] [tgz] |
---|---|---|
author | Benoit Jacob <benoitjacob@google.com> | Thu Jun 25 11:54:15 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Jun 25 11:54:48 2020 -0700 |
tree | bd3ea5321506ebb4cd68c4afbf4c1d85b22f68c5 | |
parent | fd803fb4aecde5b6032eb9cba1550852a996ab86 [diff] |
Store the MulParams by value, in a char[] buffer, in TrMulParams. This will allow us to mutate them as part of CreateTrMulParams, to implement the transposition to reduce all TrMul's to the column-major-destination case. This also removes the last instance where we were referencing a user-provided data structure all the way through ruy's internal code. Matrix parameters had already been switched to being copied into internal Mat's in the front-end. Here we could have created a similar 'internal MulParams' data structure, but MulParams is different from the Mat parameters in that it is only used in the type-unerased back-end (kernel) code. This removes the need to create a type-erased MulParams variant and makes it compelling to just "pickle" the raw underlying bytes until we reach the type-unerased back-end. PiperOrigin-RevId: 318317324
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.
ruy is designed to achieve maximal 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.
ruy is currently only optimized for the ARM architectures (both 64-bit and 32-bit code). Optimization for the Intel x86 architecture is in progress.
ruy is currently optimized only for the following combination of storage orders: LHS = row-major, RHS = column-major, destination = column-major. All other combinations of storage orders fall back to slow reference code at the moment.