inference_results_v0.5
inference_results_v0.5 copied to clipboard
Compiler errors when building Intel resnet benchmark
I am attempting to build and run the Intel inference benchmarks which use PyTorch (Caffe2). Following these instructions leads to the following build error when I run make.
Click for full compiler logs
...
inferencer.cc:144:38: required from here
/usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator
static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
inferencer.cc:144:38: required from here
/usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator
static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
g++ -fopenmp inferencer.cc -O3 -fpic -Wall -std=c++11 -g -I/opt/miniconda3//include -I/opt/pytorch/torch/include -I/opt/pytorch/third_party/ideep/include -I/opt/pytorch/third_party/ideep/euler/include -I/opt/pytorch/caffe2/core/nomnigraph/include -I~/tools/boost_1_63_0-install/include -L/opt/miniconda3//lib -L/opt/pytorch/third_party/ideep/euler/build/lib -L ~/.local/lib -L/opt/pytorch/build/lib -L~/tools/boost_1_63_0-install/lib -o inferencer -lcaffe2 -lc10 -lprotobuf `pkg-config --cflags --libs opencv` -lpthread -lrt
In file included from /opt/pytorch/third_party/ideep/include/ideep.hpp:40,
from /opt/pytorch/torch/include/caffe2/ideep/ideep_utils.h:6,
from classifier.h:15,
from inferencer.cc:2:
/opt/pytorch/third_party/ideep/include/ideep/tensor.hpp: In member function ‘void ideep::param::descriptor::to_bytes(ideep::utils::bytestring&) const’:
/opt/pytorch/third_party/ideep/include/ideep/tensor.hpp:161:35: warning: comparison between ‘const enum mkldnn_memory_format_t’ and ‘enum ideep::format’ [-Wenum-compare]
if (desc->format == format::blocked) {
^~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/tensor.hpp: In member function ‘void ideep::tensor::feed_from(const ideep::tensor&)’:
/opt/pytorch/third_party/ideep/include/ideep/tensor.hpp:1253:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i = 0; i < dst_scale.size(); i++) {
~~^~~~~~~~~~~~~~~~~~
In file included from /opt/pytorch/third_party/ideep/include/ideep.hpp:39,
from /opt/pytorch/torch/include/caffe2/ideep/ideep_utils.h:6,
from classifier.h:15,
from inferencer.cc:2:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp: In member function ‘int ideep::computation::num_of_inputs() const’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:216:34: warning: comparison of integer expressions of different signedness: ‘ideep::utils::s_vector<ideep::tensor>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
IDEEP_ENFORCE(inouts_.size() == (inputs_num_ + outputs_num_),
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/abstract_types.hpp:25:24: note: in definition of macro ‘IDEEP_ENFORCE’
error::wrap_c_api((condition) \
^~~~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp: In member function ‘int ideep::computation::num_of_outputs() const’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:222:34: warning: comparison of integer expressions of different signedness: ‘ideep::utils::s_vector<ideep::tensor>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
IDEEP_ENFORCE(inouts_.size() == (inputs_num_ + outputs_num_),
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/abstract_types.hpp:25:24: note: in definition of macro ‘IDEEP_ENFORCE’
error::wrap_c_api((condition) \
^~~~~~~~~
In file included from /opt/pytorch/third_party/ideep/include/ideep.hpp:41,
from /opt/pytorch/torch/include/caffe2/ideep/ideep_utils.h:6,
from classifier.h:15,
from inferencer.cc:2:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp: In constructor ‘ideep::convolution_backward_weights::descriptor::descriptor(const tdesc_t&, const tdesc_t&, const tdesc_t&, const tdesc_t&, const tdims_t&, const tdims_t&, const tdims_t&, const tdims_t&, ideep::algorithm, ideep::padding_kind)’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:746:31: warning: unused variable ‘result’ [-Wunused-variable]
mkldnn_primitive_desc_t result;
^~~~~~
inferencer.cc: In function ‘void RandomMultibatchTest(caffe2::Classifier<T>&, caffe2::DataProvider<T>&)’:
inferencer.cc:41:34: warning: capture of variable ‘FLAGS_batch_size’ with non-automatic storage duration
std::vector<int> indexes = [&FLAGS_batch_size, &i](){
^~~~~~~~~~~~~~~~
In file included from /opt/pytorch/torch/include/caffe2/core/flags.h:3,
from inferencer.cc:1:
/opt/pytorch/torch/include/c10/util/Flags.h:182:19: note: ‘int FLAGS_batch_size’ declared here
C10_EXPORT type FLAGS_##name = default_value; \
^~~~~~
/opt/pytorch/torch/include/c10/util/Flags.h:200:3: note: in expansion of macro ‘C10_DEFINE_typed_var’
C10_DEFINE_typed_var(int, name, default_value, help_str)
^~~~~~~~~~~~~~~~~~~~
inferencer.cc:11:1: note: in expansion of macro ‘C10_DEFINE_int’
C10_DEFINE_int(batch_size, 1, "image batch sizes");
^~~~~~~~~~~~~~
In file included from /opt/pytorch/third_party/ideep/include/ideep/lru_cache.hpp:7,
from /opt/pytorch/third_party/ideep/include/ideep/tensor.hpp:10,
from /opt/pytorch/third_party/ideep/include/ideep.hpp:40,
from /opt/pytorch/torch/include/caffe2/ideep/ideep_utils.h:6,
from classifier.h:15,
from inferencer.cc:2:
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp: In instantiation of ‘void ideep::utils::s_vector<T, Alloc>::assign(ideep::utils::s_vector<T, Alloc>::size_type, const T&, const Alloc&) [with T = std::shared_ptr<ideep::tensor::reorder>; Alloc = std::allocator<std::shared_ptr<ideep::tensor::reorder> >; ideep::utils::s_vector<T, Alloc>::size_type = long unsigned int]’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:52:69: required from here
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp:98:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘ideep::utils::s_vector<std::shared_ptr<ideep::tensor::reorder> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i =0; i < count; i ++)
~~^~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp:104:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘ideep::utils::s_vector<std::shared_ptr<ideep::tensor::reorder> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i =0; i < count; i ++)
~~^~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp: In instantiation of ‘ideep::utils::s_vector<T, Alloc>::s_vector(ideep::utils::s_vector<T, Alloc>::size_type, const Alloc&) [with T = ideep::tensor; Alloc = std::allocator<ideep::tensor>; ideep::utils::s_vector<T, Alloc>::size_type = long unsigned int]’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:104:70: required from here
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp:49:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘ideep::utils::s_vector<ideep::tensor>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i =0; i < count; i ++)
~~^~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp: In instantiation of ‘void ideep::utils::s_vector<T, Alloc>::assign(ideep::utils::s_vector<T, Alloc>::size_type, const T&, const Alloc&) [with T = std::shared_ptr<ideep::tensor>; Alloc = std::allocator<std::shared_ptr<ideep::tensor> >; ideep::utils::s_vector<T, Alloc>::size_type = long unsigned int]’:
/opt/pytorch/third_party/ideep/include/ideep/computations.hpp:127:68: required from here
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp:98:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘ideep::utils::s_vector<std::shared_ptr<ideep::tensor> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i =0; i < count; i ++)
~~^~~~~~~
/opt/pytorch/third_party/ideep/include/ideep/utils.hpp:104:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘ideep::utils::s_vector<std::shared_ptr<ideep::tensor> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i =0; i < count; i ++)
~~^~~~~~~
inferencer.cc: In instantiation of ‘void run_net() [with T = char]’:
inferencer.cc:144:38: required from here
inferencer.cc:91:29: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
for (std::size_t i = 0; i < FLAGS_batch_size * FLAGS_iterations; ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inferencer.cc: In instantiation of ‘void run_net() [with T = float]’:
inferencer.cc:145:23: required from here
inferencer.cc:91:29: warning: comparison of integer expressions of different signedness: ‘std::size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
In file included from /opt/pytorch/third_party/ideep/include/ideep/tensor.hpp:10,
from /opt/pytorch/third_party/ideep/include/ideep.hpp:40,
from /opt/pytorch/torch/include/caffe2/ideep/ideep_utils.h:6,
from classifier.h:15,
from inferencer.cc:2:
/opt/pytorch/third_party/ideep/include/ideep/lru_cache.hpp: In instantiation of ‘static ideep::utils::lru_cache<key_t, value_t>& ideep::utils::computation_cache<value_t, capacity, key_t>::t_store() [with value_t = ideep::tensor::reorder; long unsigned int capacity = 1024; key_t = std::__cxx11::basic_string<char>]’:
/opt/pytorch/third_party/ideep/include/ideep/lru_cache.hpp:165:19: required from ‘static ideep::utils::computation_cache<value_t, capacity, key_t>::iterator ideep::utils::computation_cache<value_t, capacity, key_t>::find(const key_t&) [with value_t = ideep::tensor::reorder; long unsigned int capacity = 1024; key_t = std::__cxx11::basic_string<char>; ideep::utils::computation_cache<value_t, capacity, key_t>::iterator = std::_List_iterator<ideep::utils::lru_cache<std::__cxx11::basic_string<char>, ideep::tensor::reorder, std::unordered_map>::node_t>]’
/opt/pytorch/third_party/ideep/include/ideep/tensor.hpp:1001:7: required from here
/opt/pytorch/third_party/ideep/include/ideep/lru_cache.hpp:184:29: warning: unused variable ‘new_capacity’ [-Wunused-variable]
static thread_local int new_capacity = [&](const char *pt) {
^~~~~~~~~~~~
In file included from inferencer.cc:3:
data_provider.h: In instantiation of ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
inferencer.cc:102:27: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:200:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
if ((batchSize_ * iterations_ < IMAGENET_IMAGE_SIZE) && useIndex_)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::load_sample(size_t*, size_t) [with T = char; size_t = long unsigned int]’:
inferencer.cc:119:3: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:137:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
if (sample_size != batchSize_ * iterations_)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
inferencer.cc:102:27: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:200:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
if ((batchSize_ * iterations_ < IMAGENET_IMAGE_SIZE) && useIndex_)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::load_sample(size_t*, size_t) [with T = float; size_t = long unsigned int]’:
inferencer.cc:119:3: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:137:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
if (sample_size != batchSize_ * iterations_)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inferencer.cc:2:
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::PrepareInputBlob(T*, const int*) [with T = char]’:
classifier.h:178:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
classifier.h:463:62: warning: narrowing conversion of ‘((caffe2::Classifier<char>*)this)->caffe2::Classifier<char>::net_conf_.std::unique_ptr<caffe2::NetConf>::operator->()->caffe2::NetConf::input_scale’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
ideep::scale_t input_scale = ConvertScales({net_conf_->input_scale});
~~~~~~~~~~~^~~~~~~~~~~
classifier.h:463:62: warning: narrowing conversion of ‘((caffe2::Classifier<char>*)this)->caffe2::Classifier<char>::net_conf_.std::unique_ptr<caffe2::NetConf>::operator->()->caffe2::NetConf::input_scale’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::PrepareInputBlob(T*, const int*) [with T = float]’:
classifier.h:178:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
classifier.h:463:62: warning: narrowing conversion of ‘((caffe2::Classifier<float>*)this)->caffe2::Classifier<float>::net_conf_.std::unique_ptr<caffe2::NetConf>::operator->()->caffe2::NetConf::input_scale’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
classifier.h:463:62: warning: narrowing conversion of ‘((caffe2::Classifier<float>*)this)->caffe2::Classifier<float>::net_conf_.std::unique_ptr<caffe2::NetConf>::operator->()->caffe2::NetConf::input_scale’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
In file included from inferencer.cc:3:
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::Preprocess(bool, T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = char]’:
data_provider.h:294:3: required from ‘void caffe2::DataProvider<T>::WrapLocalInput(bool) [with T = char]’
data_provider.h:301:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = char]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:440:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare]
for (int i = 0; i < batchSize_ * inputSize_; ++i)
~~^~~~~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::CreateUseSharedMemory(bool) [with T = char]’:
data_provider.h:282:5: required from ‘void caffe2::DataProvider<T>::WrapSHMInput(bool) [with T = char]’
data_provider.h:303:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = char]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:238:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
if ((batchSize_ * iterations_ < IMAGENET_IMAGE_SIZE) && useIndex_)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::DirectUseSharedMemory(bool) [with T = char]’:
data_provider.h:284:5: required from ‘void caffe2::DataProvider<T>::WrapSHMInput(bool) [with T = char]’
data_provider.h:303:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = char]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:257:5: warning: catching polymorphic type ‘class boost::interprocess::interprocess_exception’ by value [-Wcatch-value=]
catch(boost::interprocess::interprocess_exception) {
^~~~~
In file included from inferencer.cc:2:
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::CreateUseSharedWeight() [with T = char]’:
classifier.h:209:5: required from ‘void caffe2::Classifier<T>::PrepareWeightBlob() [with T = char]’
classifier.h:194:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
classifier.h:300:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i = 0; i < weight_blob_names.size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from /opt/pytorch/torch/include/c10/util/Registry.h:20,
from /opt/pytorch/torch/include/c10/util/Flags.h:36,
from /opt/pytorch/torch/include/caffe2/core/flags.h:3,
from inferencer.cc:1:
/usr/include/c++/8/bits/stl_vector.h: In instantiation of ‘class std::vector<float, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>, boost::interprocess::iset_index> > >’:
classifier.h:342:20: required from ‘void caffe2::Classifier<T>::CreateUseSharedWeight() [with T = char]’
classifier.h:209:5: required from ‘void caffe2::Classifier<T>::PrepareWeightBlob() [with T = char]’
classifier.h:194:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
/usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator
static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inferencer.cc:2:
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::DirectUseSharedWeight() [with T = char]’:
classifier.h:211:5: required from ‘void caffe2::Classifier<T>::PrepareWeightBlob() [with T = char]’
classifier.h:194:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
classifier.h:373:10: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
while (*(managed_shm_.find<int>(("SharedWeightSize" + numaId_).c_str()).first)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!= weight_blob_names.size()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
classifier.h:381:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i = 0; i < weight_blob_names.size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inferencer.cc:3:
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::Preprocess(bool, T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = float]’:
data_provider.h:294:3: required from ‘void caffe2::DataProvider<T>::WrapLocalInput(bool) [with T = float]’
data_provider.h:301:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = float]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:440:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare]
for (int i = 0; i < batchSize_ * inputSize_; ++i)
~~^~~~~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::CreateUseSharedMemory(bool) [with T = float]’:
data_provider.h:282:5: required from ‘void caffe2::DataProvider<T>::WrapSHMInput(bool) [with T = float]’
data_provider.h:303:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = float]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:238:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
if ((batchSize_ * iterations_ < IMAGENET_IMAGE_SIZE) && useIndex_)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::DirectUseSharedMemory(bool) [with T = float]’:
data_provider.h:284:5: required from ‘void caffe2::DataProvider<T>::WrapSHMInput(bool) [with T = float]’
data_provider.h:303:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = float]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:257:5: warning: catching polymorphic type ‘class boost::interprocess::interprocess_exception’ by value [-Wcatch-value=]
catch(boost::interprocess::interprocess_exception) {
^~~~~
In file included from inferencer.cc:2:
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::CreateUseSharedWeight() [with T = float]’:
classifier.h:209:5: required from ‘void caffe2::Classifier<T>::PrepareWeightBlob() [with T = float]’
classifier.h:194:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
classifier.h:300:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i = 0; i < weight_blob_names.size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
classifier.h: In instantiation of ‘void caffe2::Classifier<T>::DirectUseSharedWeight() [with T = float]’:
classifier.h:211:5: required from ‘void caffe2::Classifier<T>::PrepareWeightBlob() [with T = float]’
classifier.h:194:3: required from ‘void caffe2::Classifier<T>::InitNet(const string&, const string&, const string&) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
classifier.h:134:3: required from ‘caffe2::Classifier<T>::Classifier(const string&, T*, const std::vector<int>&, const string&, const string&, int, const string&, bool, int, int, const string&, bool, int, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:108:25: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
classifier.h:373:10: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
while (*(managed_shm_.find<int>(("SharedWeightSize" + numaId_).c_str()).first)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!= weight_blob_names.size()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
classifier.h:381:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
for (int i = 0; i < weight_blob_names.size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from inferencer.cc:3:
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::ResizeWithAspect(cv::Mat*, cv::Mat*) [with T = char]’:
data_provider.h:389:7: required from ‘void caffe2::DataProvider<T>::PreprocessUsingCVMethod(T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = char]’
data_provider.h:437:5: required from ‘void caffe2::DataProvider<T>::Preprocess(bool, T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = char]’
data_provider.h:294:3: required from ‘void caffe2::DataProvider<T>::WrapLocalInput(bool) [with T = char]’
data_provider.h:301:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = char]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = char]’
inferencer.cc:144:38: required from here
data_provider.h:320:74: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(new_width, res), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:320:82: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(new_width, res), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:323:75: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(res, new_height), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:323:83: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(res, new_height), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h: In instantiation of ‘void caffe2::DataProvider<T>::ResizeWithAspect(cv::Mat*, cv::Mat*) [with T = float]’:
data_provider.h:389:7: required from ‘void caffe2::DataProvider<T>::PreprocessUsingCVMethod(T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = float]’
data_provider.h:437:5: required from ‘void caffe2::DataProvider<T>::Preprocess(bool, T*, const std::vector<std::__cxx11::basic_string<char> >&) [with T = float]’
data_provider.h:294:3: required from ‘void caffe2::DataProvider<T>::WrapLocalInput(bool) [with T = float]’
data_provider.h:301:5: required from ‘void caffe2::DataProvider<T>::WrapInput(bool) [with T = float]’
data_provider.h:203:3: required from ‘caffe2::DataProvider<T>::DataProvider(const string&, const string&, const string&, int, const string&, bool, int, const string&, const string&, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
inferencer.cc:102:27: required from ‘void run_net() [with T = float]’
inferencer.cc:145:23: required from here
data_provider.h:320:74: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(new_width, res), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:320:82: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(new_width, res), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:323:75: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(res, new_height), (0, 0), (0, 0), inter_pol);
~~^~~~
data_provider.h:323:83: warning: left operand of comma operator has no effect [-Wunused-value]
cv::resize((*sample), (*sample_resized), cv::Size(res, new_height), (0, 0), (0, 0), inter_pol);
~~^~~~
In file included from classifier.h:19,
from inferencer.cc:2:
net_config.h: In function ‘std::unique_ptr<caffe2::NetConf> caffe2::get_net_conf(const string&)’:
net_config.h:107:19: warning: control reaches end of non-void function [-Wreturn-type]
<< "or you can just input 'resnet50' 'mobilenetv1' as net_conf";
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:18: inferencer] Error 1
It's possible that I have installed some incompatible versions of dependencies. I am compiling on RHEL8 (UBI8 container). Any suggestions from people who have been able to run these would be appreciated.
I was able to build inferencer
, by switching to a RHEL UBI7 container, replacing -lcaffe2
with -ltorch
in the Makefile
, since the caffe2 API has moved to libtorch
, and building OpenCV 3 from source.
However, I am still hoping the creators of this implementation could give more instructions on how to run the benchmark, and where to get the exact model files they used (resnet50/init_net_int8.pb and resnet50/predict_net_int8.pbtxt)
Hi, dagrayvid. So how did you build the Intel resnet benchmark? I can't find the dataset and model files in the repo, can you give me some advice about where to find it? I really appreciate it if you can share more experience on this benchmark. Thanks!
And some environment variables in these scripts are quite confusing, they use ambiguous relative paths.