Giter Site home page Giter Site logo

MKL threading about mkl4deb HOT 3 CLOSED

kkm000 avatar kkm000 commented on July 24, 2024
MKL threading

from mkl4deb.

Comments (3)

eddelbuettel avatar eddelbuettel commented on July 24, 2024

The details now escape me :-/ but IIRC this goes back to a tip I got from an Intel engineer from one of their labs -- it may have been in the context of RcppParallel (which uses TBB). I don't recall now - I seem to remember that it was related to using the GNU toolchain (as common in Linux) along with the MKL (rather than Intel's compiler, IIRC).

Edit: Maybe it was this thread: #2. And more here: c6d8d84. I suggest you talk more to Intel.

from mkl4deb.

kkm000 avatar kkm000 commented on July 24, 2024

I think what the script is doing is exactly right, provided that the users are familiar with the peculiarities of MKL threading: changing the default from the multithreaded iomp5 to, multithreaded again, GOMP-based implementation. On the other hand, it may have a surprising effect on performance if someone is using it simply as an alternative to generic single-threaded BLAS libraries. MKL_THREADING_LAYER=sequential (no automatic multithreading) may potentially be a safer default for the general user for two reasons: (1) it does not load any OMP libraries into the process, so no possible conflicts like in #2 with GCC -fopenmp, and (2) automatic multithreading with MKL is not necessarily always the best choice.

It's possible that I'm confused, not understanding the intended audience for this script. I was just too impressed with your update-alternatives idea not to read the whole script, and thought maybe sharing this tidbit would be helpful. Again, sorry if you feel I'm just wasting your time.

from mkl4deb.

andrewjholbrook avatar andrewjholbrook commented on July 24, 2024

@kkm000 Thanks for the information, MKL_THREADING_LAYER=sequential is faster than default is faster than MKL_THREADING_LAYER=GNU on my machine.

from mkl4deb.

Related Issues (18)

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.