message: Add profiler code
diff: @@ -140,6 +140,8 @@ _CPP_HEADER = """// Autogenerated file by {gen}. Do not edit directly!
  #include <ATen/CPUGenerator.h>
  #include <c10/util/Exception.h>
  #include <c10/util/Logging.h>
  +#include <torch/csrc/autograd/function.h>
  +#include <torch/csrc/autograd/record_function.h>
  #include "aten_ipex_bridge.h"
  #include "utils.h"
  @@ -515,9 +517,16 @@ class DenseOPCodeGen(object):
  # Gen definition code for cpp file
  code = '{} {{\n'.format(cpp_func_str_cpp)
  + # Gen profile info
  code += '#if defined(_DEBUG)\n'
  code += ' printf("{}::{}\\n");\n'.format(_IPEX_OP_FUNC_NS, cpp_sig.def_name)
  code += '#endif\n'
  + profiler_inputs = []
  + for param in cpp_sig.input_params:
  + if param.core_type in ['Tensor', 'Scalar']:
  + profiler_inputs.append(param.name)
  + code += ' RECORD_FUNCTION("{ns}::{name}", std::vector<c10::IValue>({{{input_names}}}), torch::autograd::Node::peek_at_next_sequence_nr());\n'.format(ns=_IPEX_OP_FUNC_NS, name=cpp_sig.def_name, input_names=', '.join(profiler_inputs))
  +
  if is_conv_overrideable_func(cpp_sig.def_name):
  code += ' return AtenIpexCPUDev::dil_{}({});\n'.format(cpp_sig.def_name, ', '.join([param.name for param in cpp_sig.input_params]))
  