2017-07-20 1 views
-1

Juste essayé de construire TF avec icc et il continue d'échouer. ce qui suit est la commande utilisée pour la construction:Compiler TensorFlow avec le compilateur Intel C

CC = Bazel icc construire --verbose_failures --config = MKL --copt = -msse4.2 --copt = "- DEIGEN_USE_VML" opt -c // tensorflow/outils/pip_package: build_pip_package

ce qui suit est la sortie d'erreur:

INFO: From Compiling tensorflow/contrib/memory_stats/ops/memory_stats_ops.cc [for host]: 
icc: command line warning #10006: ignoring unknown option '-frandom-seed=bazel-out/host/bin/tensorflow/contrib/memory_stats/_objs/memory_stats_ops_op_lib/tensorflow/contrib/memory_stats/ops/memory_stats_ops.o' 
icc: command line warning #10006: ignoring unknown option '-Wno-builtin-macro-redefined' 
Warning #2011: predefined meaning of "__DATE__" discarded 

Warning #2011: predefined meaning of "__TIMESTAMP__" discarded 

Warning #2011: predefined meaning of "__TIME__" discarded 

tensorflow/contrib/memory_stats/ops/memory_stats_ops.cc(29): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/memory_stats/ops/memory_stats_ops.cc(29): warning #2196: routine is both "inline" and "noinline" 

ERROR: /home/bert/tensorflow/tensorflow/contrib/image/BUILD:20:1: C++ compilation of rule '//tensorflow/contrib/image:python/ops/_image_ops.so' failed: icc failed: error executing command 
    (cd /root/.cache/bazel/_bazel_root/de2d5e30e11a47d70dad7109465f3a0a/execroot/org_tensorflow && \ 
    exec env - \ 
    PWD=/proc/self/cwd \ 
    PYTHON_BIN_PATH=/opt/intel/intelpython3/bin/python \ 
    PYTHON_LIB_PATH=/opt/intel/intelpython3/lib/python3.5/site-packages \ 
    TF_NEED_CUDA=0 \ 
    TF_NEED_OPENCL=0 \ 
    /opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64/icc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/opt/intel/compilers_and_libraries_2017.4.196/linux/bin/intel64 -B/usr/bin -Wunused-but-set-parameter -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -msse4.2 -DEIGEN_USE_VML '-std=c++0x' -MD -MF bazel-out/local-py3-opt/bin/tensorflow/contrib/image/_objs/python/ops/_image_ops.so/tensorflow/contrib/image/kernels/bipartite_match_op.pic.d '-frandom-seed=bazel-out/local-py3-opt/bin/tensorflow/contrib/image/_objs/python/ops/_image_ops.so/tensorflow/contrib/image/kernels/bipartite_match_op.pic.o' -fPIC -DEIGEN_MPL2_ONLY -iquote . -iquote bazel-out/local-py3-opt/genfiles -iquote external/protobuf -iquote bazel-out/local-py3-opt/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/local-py3-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/local-py3-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/local-py3-opt/genfiles/external/local_config_sycl -isystem external/protobuf/src -isystem bazel-out/local-py3-opt/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem third_party/eigen3/mkl_include -isystem bazel-out/local-py3-opt/genfiles/third_party/eigen3/mkl_include -isystem external/eigen_archive -isystem bazel-out/local-py3-opt/genfiles/external/eigen_archive -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare -fno-exceptions '-DINTEL_MKL=1' -fopenmp -msse3 -pthread -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/contrib/image/kernels/bipartite_match_op.cc -o bazel-out/local-py3-opt/bin/tensorflow/contrib/image/_objs/python/ops/_image_ops.so/tensorflow/contrib/image/kernels/bipartite_match_op.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 2. 
icc: command line warning #10006: ignoring unknown option '-frandom-seed=bazel-out/local-py3-opt/bin/tensorflow/contrib/image/_objs/python/ops/_image_ops.so/tensorflow/contrib/image/kernels/bipartite_match_op.pic.o' 
icc: command line warning #10120: overriding '-msse4.2' with '-msse3' 
icc: command line warning #10006: ignoring unknown option '-Wno-builtin-macro-redefined' 
Warning #2011: predefined meaning of "__DATE__" discarded 

Warning #2011: predefined meaning of "__TIMESTAMP__" discarded 

Warning #2011: predefined meaning of "__TIME__" discarded 

In file included from tensorflow/contrib/image/kernels/bipartite_match_op.cc(17): 
./tensorflow/core/framework/op_kernel.h(317): warning #858: type qualifier on return type is meaningless 
    const int graph_def_version() const { return graph_def_version_; } 
    ^

tensorflow/contrib/image/kernels/bipartite_match_op.cc(88): error: type name is not allowed 
     typename TTypes<float, 2>::ConstTensor distance_mat = 
    ^

tensorflow/contrib/image/kernels/bipartite_match_op.cc(88): error: expected a ";" 
     typename TTypes<float, 2>::ConstTensor distance_mat = 
              ^

tensorflow/contrib/image/kernels/bipartite_match_op.cc(98): error: identifier "distance_mat" is undefined 
       DistancePair(index1, index2, distance_mat(index1, index2))); 
             ^

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

tensorflow/contrib/image/kernels/bipartite_match_op.cc(134): warning #2196: routine is both "inline" and "noinline" 

compilation aborted for tensorflow/contrib/image/kernels/bipartite_match_op.cc (code 2) 
Target //tensorflow/tools/pip_package:build_pip_package failed to build 
INFO: Elapsed time: 93.648s, Critical Path: 18.66s 

la question semble être une contrib, est-il possible d'exclure certains de la compilation contribs? Le Python utilisé est intel python 3.5 Comme un peu d'arrière-plan, le système est Ubuntu 16 fonctionnant sur dual x5550, le but étant d'obtenir de meilleures performances puisque TF simple sur un PC (i7-4700mq) fonctionne beaucoup plus vite.

+0

Même si elle parvient à construire, comment voulez-vous l'intention d'utiliser une bibliothèque partagée construite par la CPI à l'intérieur Python construit par GCC? – danny

+0

python et les bibliothèques sont construites à partir d'ICC, il est fourni avec Intel® Parallel Studio XE. – OssieG

+0

Dès le premier avertissement, il est évident que le makefile n'est pas compatible avec icc. Vous devrez éditer le makefile pour que toutes les options du compilateur correspondent. –

Répondre

0

Ceci est un bug dans le compilateur Intel. Vous devez remplacer

typename TTypes<float, 2>::ConstTensor distance_mat = 

avec

auto distance_mat = 

Plus d'informations peuvent être trouvées dans ce thread