visuel studio 2015 - Fejl med kIndexInFileMessages, mens du compiler Caffe2 på Windows 10-systemet

Indlæg af Hanne Mølgaard Plasc

Problem



Jeg har forsøgt at kompilere caffe2 på et windows 10 system med cuda for den sidste uge. Biblioteket er klart ikke klar til Windows-udgivelse, da der var mange problemer under installationen.


Efter forskellige tweaking på CMake og løb ind på git bash vindue, kunne jeg endelig få nogle fremskridt og begynde at bygge biblioteket, indtil jeg kom på tværs af dette problem.


"D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj"(▒⺻ ▒▒▒)(16)->
(CustomBuild ▒▒▒) ->
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(227): error : member "caffe2::TensorProto\_Segment::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(349): error : member "caffe2::TensorProto::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(660): error : member "caffe2::QTensorProto::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(847): error : member "caffe2::TensorProtos::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(959): error : member "caffe2::TensorShape::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(1122): error : member "caffe2::TensorShapes::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(1234): error : member "caffe2::Argument::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(1463): error : member "caffe2::DeviceOption::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(1620): error : member "caffe2::OperatorDef::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(1895): error : member "caffe2::NetDef::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(2124): error : member "caffe2::ExecutionStep::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(2401): error : member "caffe2::PlanDef::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(2544): error : member "caffe2::BlobProto::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]
  D:/Projects/Caffe2/caffe2/buildcaffe2/proto/caffe2.pb.h(2741): error : member "caffe2::DBReaderProto::kIndexInFileMessages" may not be initialized [D:ProjectsCaffe2caffe2uildcaffe2caffe2\_gpu.vcxproj]


Hvad forårsager fejlen ': : kIndexInFileMessages' muligvis ikke initialiseres 'Jeg har kontrolleret det pågældende stykke kode og jeg ser ikke noget særligt ud . Værdierne er initieret i filen caffe2.pb.h .


  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const TensorProto\_Segment* internal\_default\_instance() {
    return reinterpret\_cast<const TensorProto\_Segment*>(
               &\_TensorProto\_Segment\_default\_instance\_);
  }
  static PROTOBUF\_CONSTEXPR int const kIndexInFileMessages = 0;


Dette er et resumé af mine byggeindstillinger:


-- ******** Summary ********
-- General:
--   CMake version         : 3.11.0
--   CMake command         : C:/Program Files (x86)/CMake/bin/cmake.exe
--   Git version           : v0.8.1-1500-g0dd328452-dirty
--   System                : Windows
--   C++ compiler          : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86\_amd64/cl.exe
--   C++ compiler version  : 19.0.24215.1
--   BLAS                  : Eigen
--   CXX flags             : /DWIN32 /D\_WINDOWS /W3 /GR /EHsc -DONNX\_NAMESPACE=onnx\_c2 /MP /bigobj
--   Build type            : Release
--   Compile definitions   : PROTOBUF\_USE\_DLLS
--
--   BUILD\_BINARY          : ON
--   BUILD\_CUSTOM\_PROTOBUF : OFF
--     Protobuf compiler   : Protobuf\_PROTOC\_EXECUTABLE-NOTFOUND
--     Protobuf includes   :
--     Protobuf libraries  : Protobuf\_LIBRARY-NOTFOUND
--   BUILD\_DOCS            : OFF
--   BUILD\_PYTHON          : ON
--     Python version      : 2.7.14
--     Python includes     : C:/Python27/include
--   BUILD\_SHARED\_LIBS     : ON
--   BUILD\_TEST            : OFF
--   USE\_ATEN              : OFF
--   USE\_ASAN              : OFF
--   USE\_CUDA              : ON
--     CUDA version        : 9.1
--     CuDNN version       : 7.1.2
--     CUDA root directory : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1
--     CUDA library        : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/lib/x64/cuda.lib
--     CUDA NVRTC library  : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/lib/x64/nvrtc.lib
--     CUDA runtime library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/lib/x64/cudart.lib
--     CUDA include path   : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/include
--     NVCC executable     : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.1/bin/nvcc.exe
--     CUDA host compiler  : $(VCInstallDir)bin
--   USE\_EIGEN\_FOR\_BLAS    : 1
--   USE\_FFMPEG            : OFF
--   USE\_GFLAGS            : OFF
--   USE\_GLOG              : OFF
--   USE\_GLOO              : OFF
--   USE\_LEVELDB           : OFF
--   USE\_LITE\_PROTO        : OFF
--   USE\_LMDB              : OFF
--   USE\_METAL             : OFF
--   USE\_MKL               :
--   USE\_MOBILE\_OPENGL     : OFF
--   USE\_MPI               : OFF
--   USE\_NCCL              : OFF
--   USE\_NERVANA\_GPU       : OFF
--   USE\_NNPACK            : OFF
--   USE\_OBSERVERS         : ON
--   USE\_OPENCV            : OFF
--   USE\_OPENMP            : OFF
--   USE\_PROF              : OFF
--   USE\_REDIS             : OFF
--   USE\_ROCKSDB           : OFF
--   USE\_ZMQ               : OFF
-- Configuring done


BUILD\_CUSTOM\_PROTOBUF er slukket, så den kan bygge protobuf biblioteket, der fulgte med caffe2 source filer.

Bedste reference