Giter Site home page Giter Site logo

How to use coverage.cmake file about onednn HOT 5 CLOSED

vineel96 avatar vineel96 commented on July 24, 2024
How to use coverage.cmake file

from onednn.

Comments (5)

vpirogov avatar vpirogov commented on July 24, 2024 1

oneDNN has build options to disable unused functionality:

  • ONEDNN_ENABLE_WORKLOAD allows to disable training functionality for inference cases
  • ONEDNN_ENABLE_PRIMITIVE allows to choose specific primitives (functions) and disable the rest
  • ONEDNN_ENABLE_PRIMITIVE_CPU_ISA and ONEDNN_ENABLE_PRIMITIVE_GPU_ISA allow to drop unused targets
  • ONEDNN_ENABLE_GEMM_KERNELS_ISA allows to drop legacy JIT GEMM kernels

from onednn.

shu1chen avatar shu1chen commented on July 24, 2024

@vineel96 I'm not sure if I understand your question correctly. Are you trying to exclude some source files from coverage output, like the option -fprofile-exclude-files=regex(Program Instrumentation Options) supported by gcc, or the options gcov-filter supported by gcov?

from onednn.

vineel96 avatar vineel96 commented on July 24, 2024

@shu1chen, Yes similar to gcov tool. I wanted to remove any unused codes when we run a primitive. Example if I run oneDNN's matmul code, it should identify out of all oneDNN's matmul code which functions or code files are not used for any kind of input. So coverage.cmake file is used for this purpose ?

from onednn.

shu1chen avatar shu1chen commented on July 24, 2024

@vineel96 No, I think it's not for the purpose you mentioned. As seen in the source code, coverage.cmake gets gcov tool involved, which helps to report the test code coverage.
There are some cross-dependencies in the source code and usually the oneDNN library is used as a full library. Can you explain why you want to remove the unused code? Is it to reduce the size of the binary?
I'm not aware of any tool/script that can automatically delete unused code. To reduce the code, it usually relies on developers who have a thorough understanding of the entire code base. Copy @vpirogov to see if there is any tool for this purpose

from onednn.

shu1chen avatar shu1chen commented on July 24, 2024

No updates for a week and no open questions in this thread. Closing this issue as completed

from onednn.

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.