Code Monkey home page Code Monkey logo

Comments (3)

Tombana avatar Tombana commented on July 3, 2024 1

We currently don't have a CLI flag in lce_benchmark_model to choose between these. For internal benchmarks we simply replaced the registration on the following line:

resolver->AddCustom("LceBconv2d",
compute_engine::tflite::Register_BCONV_2D());

with Register_BCONV_2D_OPT_INDIRECT_BGEMM.

I'd welcome a PR to make this into a commandline flag, my suggestion would be:

  • Add a bool use_indirect_bgemm (default false) argument to RegisterLCECustomOps with another if-branch next to use_reference_bconv in lce_ops_register.h.

  • To add it as a commandline flag, I'd say the simplest (without modifying the TFLite benchmark BenchmarkTfLiteModel code) is to parse the commandline flags in lce_benchmark_main.cc and store the result as a global bool in that file, which can then be passed to RegisterLCECustomOps on line 26.

Note that use_reference_bconv uses core/bconv2d/reference.h which supports 'everything' such as zero-padding, one-padding and groups. The optimized implementations, however, don't support all of those.

from compute-engine.

simonmaurer avatar simonmaurer commented on July 3, 2024 1

@Tombana thanks a lot for pointing me to the right direction.
can do a PR and include a filtering of the arguments, so we can parse the flag (as suggested by you) and remove it from argv before passing it to the BenchmarkTfLiteModel as I assume (need to verify though) this will throw an unrecognized argument error

from compute-engine.

simonmaurer avatar simonmaurer commented on July 3, 2024

closing issue as it has been solved by #717

from compute-engine.

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.