i want to build caffe2 server operators to test fbgemm, but i meet thest problems:
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h: In instantiation of ‘caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW()::<lambda(caffe2::Tensor*)> [with T = float; Context = caffe2::CPUContext]’:
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:173:13: required from ‘struct caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]::<lambda(class caffe2::Tensor*)>’
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:181:3: required from ‘bool caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]’
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op.cc:209:1: required from here
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:118:15: error：redeclration of ‘const int& C’
C * X_HxW,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:98:53: note：‘const int& C’ previously declared here
math::Im2Col<T, Context, StorageOrder::NCHW>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error：redeclration of ‘const int& G’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note：‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:149:15: error：redeclration of ‘const int& M’
M / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note：‘const int& M’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:149:15: error：redeclration of ‘const int& G’
M / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note：‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error：redeclration of ‘const int& Y_HxW’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note：‘const int& Y_HxW’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:145:45: error：redeclration of ‘const int& kernel_dim’
math::GemmStridedBatched<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note：‘const int& kernel_dim’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:156:25: error：redeclration of ‘const int& buffer_size’
buffer_size / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:116:55: note：‘const int& buffer_size’ previously declared here
math::Im2ColNd<T, Context, StorageOrder::NCHW>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:156:25: error：redeclration of ‘const int& G’
buffer_size / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note：‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:159:22: error：redeclration of ‘const int& G’
Y_stride / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:131:13: note：‘const int& G’ previously declared here
if (G == 1) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:165:31: error：redeclration of ‘const int& M’
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note：‘const int& M’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:165:31: error：redeclration of ‘const int& Y_HxW’
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:132:31: note：‘const int& Y_HxW’ previously declared here
math::Gemm<T, Context>(
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:179:14: error：redeclration of ‘const int& Y_stride’
Y_data += Y_stride;
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:159:22: note：‘const int& Y_stride’ previously declared here
Y_stride / G,
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h: In instantiation of ‘bool caffe2::ConvOp<T, Context>::RunOnDeviceWithOrderNCHW() [with T = float; Context = caffe2::CPUContext]’:
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op.cc:209:1: required from here
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
const auto func = [&](Tensor* col_buffer) {
^
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
/data/home/ryankang/Workspace/pytorch/caffe2/operators/conv_op_impl.h:92:21: sorry, unimplemented: non-trivial designated initializers not supported
here is my environment and CMakelists.txt options:

PyTorch Version (e.g., 1.0): 1.0
OS (e.g., Linux): Red Hat Linux
GCC version: 5.1.0
How you installed PyTorch ( conda ,  pip , source): source
Build command you used (if compiling from source):cmake … && make install -j
Python version: 2.7
CUDA/cuDNN version: 9.1.85
GPU models and configuration:
GPU 0: Tesla K80
GPU 1: Tesla K80
GPU 2: Tesla K80
GPU 3: Tesla K80


image.png841×892 150 KB