for investigating the performance issues, generally taking verbose
   messages for one single iteration is enough. This on-demand
   verbosing functionality makes it possible to control scope for
   verbose message dumping. In the following example, verbose messages
   will be dumped out for the second inference only.
  import torch
  model(data)
  with torch.backends.mkl.verbose(torch.backends.mkl.VERBOSE_ON):
      model(data)

Parameters:
      level -- Verbose level - "VERBOSE_OFF": Disable verbosing -
      "VERBOSE_ON":  Enable verbosing
torch.backends.mkldnn
torch.backends.mkldnn.is_available()
Returns whether PyTorch is built with MKL-DNN support.
class torch.backends.mkldnn.verbose(level)
On-demand oneDNN (former MKL-DNN) verbosing functionality To make
   it easier to debug performance issues, oneDNN can dump verbose
   messages containing information like kernel size, input data size