class_docstr: Model of BFloat16 with auto mixed precision.
class_docstr_tok: ["Model","of","BFloat16","with","auto","mixed","precision","."]
docstr: Run inference once and check the log to confirm if bf16 instructions are used.
  
  :return:True/False
docstr_tok: ["Run","inference","once","and","check","the","log","to","confirm","if","bf16","instructions","are","used",".",":","return",":","True\/False"]
code: def _max_bf16_isa(self, *args, **kwargs):
      """
      Run inference once and check the log to confirm if bf16 instructions are used.
  
      :return:True/False
      """
      dnnl_log_file = "dnnl_log.log"
      with redirect_stdout(dnnl_log_file):
          os.environ["DNNL_VERBOSE"] = "1"
          self.bf16_model(*args, **kwargs)
      dnnl_log = ""
      with open(dnnl_log_file, "r") as f:
          dnnl_log = f.read()
      if os.path.exists(dnnl_log_file):
          os.remove(dnnl_log_file)
      max_bf16_isa = None
      if "amx_bf16" in dnnl_log:
          max_bf16_isa = "AMX"
      elif "avx512_core_bf16" in dnnl_log:
          max_bf16_isa = "AVX512"
      return max_bf16_isa
  
imports: from logging import warning
  import torch
  import os
  from contextlib import redirect_stdout
  from bigdl.nano.utils.pytorch import generate_channels_last_available, apply_proper_channels_last
  from bigdl.nano.pytorch.model import AcceleratedLightningModule
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_10, TORCH_VERSION_LESS_1_12, transform_state_dict_to_dtype
  from bigdl.nano.utils.common import _bf16_checker
  from bigdl.nano.pytorch.context_manager import generate_context_manager
label_desc: Use image node_id 4 for calling the BF16Model obj's underlying member method code with example usage: obj._max_bf16_isa() and returns: max_bf16_isa