1. 22
  1.  

  2. 2

    Nice write-up!

    However, it seems that they have not yet implemented Zen kernels for every BLAS function yet.

    You cannot say for sure because you haven’t looked at the code or because there is no source?

    1. 2

      Nice write-up!

      Thanks!

      You cannot say for sure because you haven’t looked at the code or because there is no source?

      It’s proprietary. Though I guess the symbols pretty much give it away:

      $ nm libmkl*.so | grep zen  
      00000000037c27c0 T mkl_blas_cnr_def_dgemm_kernel_zen
      000000000021efc0 T mkl_serv_cpuiszen
      000000000038cce0 T mkl_blas_def_dgemm_kernel_zen
                       U mkl_serv_cpuiszen
                       U mkl_serv_cpuiszen
                       U mkl_serv_cpuiszen
      
      
      1. 1

        I see, thanks.

    2. 1

      Do you know if the same applies to IPP?

      Some quick tracing shows that MKL uses a single function mkl_serv_intel_cpu_true to detect whether it is dealing with a genuine Intel CPU. Fortunately, the function is rather trivial, so we can replace it by our own function:

      What sort of tracing can I use to find out in IPP? Strace? Thanks.

      1. 1

        There are a lot of possibilities for tracing. One for them is ltrace. E.g.:

        ltrace -l "*mkl*.so" -n 2 ./mt-sgemm
        

        Traces all calls in libraries that match the given library pattern (-l) and adds two spaces of indentation for nested calls (-n).

      2. 1

        succinct analysis & effective recommendation