Repository: pytorch
Issue: master build error
Labels: caffe2




```
/pytorch/caffe2/opt/onnxifi_op.h:259:37: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘void*’ [-fpermissive]
               static_cast<uint32_t>(max_seq_size_),
                                     ^
/media/jinn/netac/permanent/software/source_codes/dl/pytorch/c10/util/Logging.h:222:61: note: in definition of macro ‘CAFFE_ENFORCE_THAT_IMPL’
     const EnforceFailMessage& CAFFE_ENFORCE_THAT_IMPL_r_ = (condition); \
                                                             ^~~~~~~~~
/media/jian/netac/permanent/software/source_codes/dl/pytorch/caffe2/opt/onnxifi_op.h:250:7: note: in expansion of macro ‘CAFFE_ENFORCE_EQ’
       CAFFE_ENFORCE_EQ(
       ^~~~~~~~~~~~~~~~
/media//netac/permanent/software/source_codes/dl/pytorch/c10/util/Logging.h:254:33: error: too many arguments to function
   CAFFE_ENFORCE_THAT_IMPL(Equals((x), (y)), #x " == " #y, __VA_ARGS__)
                                 ^
/media//netac/permanent/software/source_codes/dl/pytorch/c10/util/Logging.h:222:61: note: in definition of macro ‘CAFFE_ENFORCE_THAT_IMPL’
     const EnforceFailMessage& CAFFE_ENFORCE_THAT_IMPL_r_ = (condition); \
                                                             ^~~~~~~~~
/media//netac/permanent/software/source_codes/dl/pytorch/caffe2/opt/onnxifi_op.h:250:7: note: in expansion of macro ‘CAFFE_ENFORCE_EQ’
       CAFFE_ENFORCE_EQ(
       ^~~~~~~~~~~~~~~~
[ 66%] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/opt/shape_info.cc.o
In file included from /usr/include/c++/6/memory:79:0,
                 from /media//netac/permanent/software/source_codes/dl/pytorch/third_party/protobuf/src/google/protobuf/stubs/common.h:41,
                 from /media//netac/permanent/software/source_codes/dl/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.pb.h:9,
                 from /media/jintn/netac/permanent/software/source_codes/dl/pytorch/build/third_party/onnx/onnx/onnx-ml.pb.h:2,
                 from /media/jinian/netac/permanent/software/source_codes/dl/pytorch/third_party/onnx/onnx/onnx_pb.h:50,
                 from /media/netac/permanent/software/source_codes/dl/pytorch/caffe2/opt/onnxifi_op.h:5,
                 from /media/netac/permanent/software/source_codes/dl/pytorch/caffe2/opt/onnxifi_op.cc:1:
/usr/include/c++/6/functional:2106:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = caffe2::OnnxifiOp<Context>::buildBackendAndGraph(caffe2::Workspace*, const std::vector<long unsigned int, std::allocator<long unsigned int> >&, const string&) [with Context = caffe2::CPUContext; std::__cxx11::string = std::__cxx11::basic_string<char>]::<lambda()>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<caffe2::onnx::BackendGraphInfo>; _ArgTypes = {}]’, declared using local type ‘caffe2::OnnxifiOp<Context>::buildBackendAndGraph(caffe2::Workspace*, const std::vector<long unsigned int, std::allocator<long unsigned int> >&, const string&) [with Context = caffe2::CPUContext; std::__cxx11::string = std::__cxx11::basic_string<char>]::<lambda()>’, is used but never defined [-fpermissive]
       function<_Res(_ArgTypes...)>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
caffe2/CMakeFiles/torch_cpu.dir/build.make:9835: recipe for target 'caffe2/CMakeFiles/torch_cpu.dir/opt/onnxifi_op.cc.o' failed
make[2]: *** [caffe2/CMakeFiles/torch_cpu.dir/opt/onnxifi_op.cc.o] Error 1

```