class_docstr: MKL Backend
class_docstr_tok: ["MKL","Backend"]
code: def __init__(
      self,
      rng_seed=None,
      default_dtype=np.float32,
      hist_bins=64,
      hist_offset=-48,
      compat_mode=None,
      # Ignored
      num_devices=None,
      stochastic_round=None,
      device_id=None,
      deterministic=None,
  ):
      super(NervanaMKL, self).__init__(
          rng_seed,
          default_dtype,
          hist_bins,
          hist_offset,
          compat_mode=compat_mode,
      )
      self.tensor_cls = MKLTensor
      logger.info("Initialized NervanaMKL")
      assert get_mkl_lib(), "MKL is not installed correctly"
  
      path = os.path.dirname(os.path.realpath(__file__))
      header_path = os.path.join(
          os.path.dirname(__file__),
          "mklEngine",
          "src",
          "math_cpu.header",
      )
  
      if sys.platform == "win32":
          mkl_ml_path = os.path.join(
              path, os.pardir, "backends", "mklEngine", "mklml.dll"
          )
          ctypes.windll.LoadLibrary(mkl_ml_path)
          mkl_engine_path = os.path.join(
              path, os.pardir, "backends", "mklEngine", "mklEngine.dll"
          )
          self.mklEngine = ctypes.windll.LoadLibrary(mkl_engine_path)
          math_engine_path = os.path.join(
              os.path.dirname(__file__), "mklEngine", "cmath.dll"
          )
  
      elif sys.platform == "darwin":
          mkl_ml_path = os.path.join(
              path, os.pardir, "backends", "mklEngine", "libmklml.dylib"
          )
          ctypes.cdll.LoadLibrary(mkl_ml_path)
          iomp5_path = os.path.join(
              path, os.pardir, "backends", "mklEngine", "libiomp5.dylib"
          )
          ctypes.cdll.LoadLibrary(iomp5_path)
          mkl_engine_path = os.path.join(
              path,
              os.pardir,
              "backends",
              "mklEngine",
              "mklEngine.dylib",
          )
          self.mklEngine = ctypes.cdll.LoadLibrary(mkl_engine_path)
          math_engine_path = os.path.join(
              os.path.dirname(__file__), "mklEngine", "cmath.dylib"
          )
  
      else:
          mkl_engine_path = os.path.join(
              path, os.pardir, "backends", "mklEngine", "mklEngine.so"
          )
          self.mklEngine = ctypes.cdll.LoadLibrary(mkl_engine_path)
          math_engine_path = os.path.join(
              os.path.dirname(__file__), "mklEngine", "cmath.so"
          )
  
      ffi = FFI()
      with open(header_path) as header:
          ffi.cdef(header.read())
      self.mathlib = ffi.dlopen(math_engine_path)
  
imports: from __future__ import division
  from builtins import zip
  import logging
  from neon.backends import layer_mkl
  from neon.backends.util.check_mkl import get_mkl_lib
  from neon.backends.nervanacpu import CPUTensor, NervanaCPU, CustomNumpy
  import ctypes
  from cffi import FFI
  from ctypes import c_longlong, c_float, c_double, c_int
  import numpy
  from neon.backends import math_cpu
  from neon.backends.backend import OpTreeNode
  import os
  import sys
label_desc: Use image node_id 1 to create a new NervanaMKL object from inherited base classes: NervanaCPU with example: obj = NervanaMKL(rng_seed, default_dtype, hist_bins, hist_offset, compat_mode, num_devices, stochastic_round, device_id, deterministic)