Giter Club home page Giter Club logo

Comments (3)

bjacob avatar bjacob commented on August 20, 2024

This spreadsheet has such data. The '8bit' sheets are comparing against gemmlowp.
https://docs.google.com/spreadsheets/d/1CB4gsI7pujNRAf5Iz5vuD783QQqO2zOu8up9IpTKdlU/edit?usp=sharing

from ruy.

fwz-fpga avatar fwz-fpga commented on August 20, 2024

This spreadsheet has such data. The '8bit' sheets are comparing against gemmlowp.
https://docs.google.com/spreadsheets/d/1CB4gsI7pujNRAf5Iz5vuD783QQqO2zOu8up9IpTKdlU/edit?usp=sharing

thanks!!
I think we will use ruy replace gemmlowp.
But another question : ( I build from source use cmake and found it generate a lot of static libs. Such as libruy_kernel_avx512.a libruy_kernel_avx.a libruy_frontend.a.
If I use ruy on arm platform, how can I only build arm related libs.

from ruy.

bjacob avatar bjacob commented on August 20, 2024

The architecture-specific static libraries like libruy_kernel_avx512.a are nearly empty when the actual build architecture is not the one that they are relevant to (e.g. x86 libraries are empty on ARM). They will only contain empty functions, or, when assertions are enabled, they will only contain a false-assertion ensuring that these functions are never called:

ruy/ruy/kernel_avx.cc

Lines 33 to 55 in 22f8922

#if !(RUY_PLATFORM_AVX && RUY_OPT(ASM))
void Kernel8bitAvx(const KernelParams8bit<8, 8>&) {
// CPU-ID-based checks should disable the path that would reach this point.
RUY_DCHECK(false);
}
void Kernel8bitAvxSingleCol(const KernelParams8bit<8, 8>&) {
// CPU-ID-based checks should disable the path that would reach this point.
RUY_DCHECK(false);
}
void KernelFloatAvx(const KernelParamsFloat<8, 8>&) {
// CPU-ID-based checks should disable the path that would reach this point.
RUY_DCHECK(false);
}
void KernelFloatAvxSingleCol(const KernelParamsFloat<8, 8>&) {
// CPU-ID-based checks should disable the path that would reach this point.
RUY_DCHECK(false);
}
#else // RUY_PLATFORM_AVX && RUY_OPT(ASM)

Note, anyway, that x86-specific code simply wouldn't compile when the target architecture is ARM.

So you should be able to ignore all this as an internal implementation detail of ruy. You can always assess what symbols are in your final binary by using the nm command from your ARM toolchain, e.g.

$HOME/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-nm --radix=d -S -C $HOME/ruy-build/ruy/example/parametrized_example | grep 'ruy::' | awk '{sum+=$2} END {print sum}'

(parametrized_example in the example directory is a simple way to assess overall ruy code size as it instantiates many different ruy::Mul template instantiations - actual applications would see smaller ruy code because they instantiate fewer).

from ruy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.