Giter Site home page Giter Site logo

Comments (2)

shu1chen avatar shu1chen commented on June 16, 2024

@kasturedeeksha From my understanding, the number of blocks jcp.nb_ic_blocking and jcp.nb_oc_blocking are initialized with value 1, meaning the data is initially not blocked. The values can be updated in some conditions, e.g. jcp.nb_ic_blocking can be updated with value i in line 2104 and jcp.nb_oc_blocking can be updated with value best_nb_oc_blocking in line 1197.

@msotoflo I see in the commit history that you updated the heuristic for nb_oc_blocking 4 years ago. Do you possibly have any suggestions for manually adjusting the values of jcp.nb_ic_blocking and jcp.nb_oc_blocking?

from onednn.

msotoflo avatar msotoflo commented on June 16, 2024

Hello @kasturedeeksha

There might be multiple reasons why these params were set to 1. Although primarily, depending on which direction the convolution is executed (e.g. forward vs backward propagation) is what kind of impact nb_ic_blocking or nb_oc_blocking will have. For forward direction, nb_oc_blocking will allow loop unrolling on the output elements. The best value for this param is chosen in src/cpu/x64/jit_avx512_common_conv_kernel.cpp#L1197 while taking into account other factors. jcp.nb_ic_blocking will do the same for backward propagation.

Additionally, I would like to point out that these are somewhat legacy JIT kernels. We now mostly depend on BRGeMM JIT Implementations to support the convolution primitive and give better performance.

Might I ask what is your interest in this specific implementation and what your approach is to running these primitives? We expect users to execute OneDNN primitives through the API and let OneDNN choose the best primitive implementation (as well as its internal parameters).

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.