class_docstr: Pytorch version >= 1.10 and <1.12, bfloat16 precision is supported.
  But there is no optimization on bfloat16.
docstr: Pytorch version is correct and bf16 instructions are detected.
  But somehow in the run, there is no bf16 instructions used.
docstr_tok: ["Pytorch","version","is","correct","and","bf16","instructions","are","detected",".","But","somehow","in","the","run",",","there","is","no","bf16","instructions","used","."]
code: def test_not_executed_on_bf16(
      self, mocked_has_bf16_isa, mocked_max_bf16_isa
  ):
      """
      Pytorch version is correct and bf16 instructions are detected.
      But somehow in the run, there is no bf16 instructions used.
      """
      mocked_has_bf16_isa.return_value = True
      mocked_max_bf16_isa.return_value = None
  
      model = resnet18(num_classes=10)
  
      x = torch.rand((10, 3, 256, 256))
  
      bf16_model = InferenceOptimizer.quantize(model, precision="bf16")
      with InferenceOptimizer.get_context(bf16_model):
          bf16_model(x)
  
imports: from unittest import TestCase
  import pytest
  import torch
  from bigdl.nano.pytorch import InferenceOptimizer
  from torchvision.models.resnet import resnet18
  from unittest.mock import MagicMock, PropertyMock, patch
  from bigdl.nano.utils.pytorch import TORCH_VERSION_LESS_1_12
  import tempfile
label_desc: Use image node_id 2 for calling the Pytorch1_12 obj's underlying member method code with example usage: obj.test_not_executed_on_bf16(mocked_has_bf16_isa, mocked_max_bf16_isa) without return types