class_docstr: No grad context manager for Pytorch Model Inference.
  
  This context manager is used for providing no_grad context only.
class_docstr_tok: ["No","grad","context","manager","for","Pytorch","Model","Inference",".","This","context","manager","is","used","for","providing","no_grad","context","only","."]
code: def __exit__(self, exc_type, exc_value, exc_tb):
      self.infer_mode.__exit__(exc_type, exc_value, exc_tb)
      if self.accelerator == "jit" and self.enable_onednn is True:
          if compare_version("torch", operator.ge, "1.12.0"):
              # onednn fusion be added to torch from version 1.12
              torch.jit.enable_onednn_fusion(False)
      torch.set_num_threads(self.original_thread_num)
  
imports: import torch
  import operator
  from bigdl.nano.utils.common import compare_version
label_desc: Use image node_id 3 for calling the BaseContextManager obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, exc_tb) without return types